Return to Snippet

Revision: 32086
at September 18, 2010 01:31 by jlvallelonga


Initial Code
Function getTodayDateString
	dim thisYear, thisMonth, thisDay, dateString

	thisYear = cstr(year(date))
	thisMonth = cstr(month(date))
	thisDay = cstr(day(date))
	
	If len(thisMonth) = 1 Then
		thisMonth = "0" & thisMonth
	End If
	
	If len(thisDay) = 1 Then
		thisDay = "0" & thisDay
	End If
	
	dateString = thisYear & thisMonth & thisDay
	getTodayDateString = dateString
End Function

Initial URL

                                

Initial Description
gets you a date string for today in YearMonthDay formant like this 20100917

Initial Title
get today date string

Initial Tags
date

Initial Language
ASP