faqts : Computers : Programming : Languages : Asp : ASP/VBScript : Common Problems : Times/Dates

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

11 of 12 people (92%) answered Yes
Recently 8 of 9 people (89%) answered Yes

Entry

What is the most efficient way to print the date in this format: June, 27, 2000?

Jul 23rd, 2000 03:18
unknown unknown, Swanand Mokashi


Swanand Mokashi has written a custom function for this : 
Function DateConvert(MyDate)
Dim strDay
Dim intDate
Dim strMonth
Dim intyear
Dim WDay
Dim MMonth
Dim int4digyear
WDay = WeekDay(MyDate)
MMonth = Month(MyDate)
strDay = WeekDayName(Wday)
intDate = Day(MyDate)
strMonth = MonthName(MMonth)
intYear = Year(MyDate)
int4digyear = Right(intYear,4)
DateConvert = " " & strDay & ", " & intDate & " " & strMonth & " " &
int4digyear 
End Function



© 1999-2004 Synop Pty Ltd