vb Date Time formatting

<%
	time() '4:40:02 PM
	date()	'10/8/2010
	now()	'10/8/2010 4:40:02 PM
	FormatDateTime(Date, 0)	'10/8/2010
	FormatDateTime(Date, 1)	'Friday, October 08, 2010
	FormatDateTime(now, 3)	'4:40:02 PM
	FormatDateTime(now, 4)	'16:40
	WeekDay(Date)	'Day of the week: 6
	Day(Date)	'Day of the month: 8
	Year(Date)	'Current Year: 2010
	Right(Year(Date),2))	'Current Year: 10
	WeekDayName(WeekDay(Date))	'Today is: Friday
	hour(now())	'Hour part: 16
	Minute(now())	'Minute part: 40
	Second(now())	'Second part: 2
%>
Examples of date/time in ASP.

Updated: Friday 8th October 2010, 13:30pm

There are 0 comments

Leave a comment of your own

Comments are currently closed.