Date.ToShortDateString : Date « System « VB.Net by API






Date.ToShortDateString

  

Public Class Tester
    Public Shared Sub Main
        Dim rightNow As Date = Now
        Dim result As New System.Text.StringBuilder
        result.AppendLine("""Now""...")

        result.Append("ToString: ").AppendLine(rightNow.ToString)
        result.Append("ToLongDateString: ")
        result.AppendLine(rightNow.ToLongDateString)
        result.Append("ToShortDateString: ")
        result.AppendLine(rightNow.ToShortDateString)
        result.Append("ToLongTimeString: ")
        result.AppendLine(rightNow.ToLongTimeString)
        result.Append("ToShortTimeString: ")
        result.AppendLine(rightNow.ToShortTimeString)
        result.Append("ToUniversalTime: ")
        result.AppendLine(rightNow.ToUniversalTime)
        result.AppendLine()

        Console.WriteLine(result.ToString)

    End Sub

End Class

   
    
  








Related examples in the same category

1.New Date(Int year, Int month, Int day)
2.New Date(Int year, Int month, Int day, Int hour, Int minute)
3.Date.AddDays
4.Date.AddMilliseconds
5.Date.AddMonths
6.Date.AddYears
7.Date.DayOfYear
8.Date.Millisecond
9.Date.Parse
10.Date.ToLongDateString
11.Date.ToLongTimeString
12.Date.ToOADate
13.Date.ToShortTimeString
14.Date.ToString
15.Date.ToUniversalTime
16.Date.op_Subtraction