Chilkat HOME ASP Visual Basic VB.NET C# Visual C++ C MFC Delphi FoxPro Java Perl PHP Python Ruby SQL Server VBScript
|
Convert a String to a Date / Time Use CDate to convert a string to a date/time.
Dim d1 As Date
Dim d2 As Date
Dim d3 As Date
d1 = CDate("August 12, 2004")
d2 = CDate("2:07:30 PM")
d3 = CDate("August 12, 2004 2:07:30 PM")
Print d1 ' prints 8/12/2004
Print d2 ' prints 2:07:30 PM
Print d3 ' prints 8/12/2004 2:07:30 PM
|
Need a specific example? Send a request to support@chilkatsoft.com
© 2000-2008 Chilkat Software, Inc. All Rights Reserved.