Advertisement
Bucher100

Week of year

May 11th, 2020
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Imports System.Globalization
  2. Public Class Form1
  3.  
  4.     Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
  5.  
  6.         Dim dateNow As Date = DateTime.Now
  7.         Dim dfi = DateTimeFormatInfo.CurrentInfo
  8.         Dim calendar = dfi.Calendar
  9.         ' using Thursday because I can.
  10.        TextBox1.Text = calendar.GetWeekOfYear(dateNow, dfi.CalendarWeekRule, DayOfWeek.Thursday)
  11.     End Sub
  12. End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement