Mega Code Archive
Create DateTime structure to the specified year, month, day, hour, minute, second, and millisecond for the specified calendar.tx
Imports System.Globalization
Imports System.Text.RegularExpressions
Imports System.Threading
Module Example
Public Sub Main()
Dim persian As New PersianCalendar()
Dim date1 As New Date(2010, 5, 27, 16, 32, 18, 500, persian)
Console.WriteLine(date1.ToString("M/dd/yyyy h:mm:ss.fff tt"))
Console.WriteLine("{0}/{1}/{2} {3}{7}{4:D2}{7}{5:D2}.{6:G3}", _
persian.GetMonth(date1), _
persian.GetDayOfMonth(date1), _
persian.GetYear(date1), _
persian.GetHour(date1), _
persian.GetMinute(date1), _
persian.GetSecond(date1), _
persian.GetMilliseconds(date1), _
DateTimeFormatInfo.CurrentInfo.TimeSeparator)
End Sub
End Module