•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP section within the Web Development category of DaniWeb, a massive community of 332,778 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,830 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP advertiser: Lunarpages ASP Web Hosting
Learn how to take the Now() command and format it in a bunch of differnt ways.
Code from: http://www.iportalx.net
Code from: http://www.iportalx.net
Last edited : Jan 2nd, 2007.
<%= Date() %> Produces: 07/01/2002 <%= Now() %> Produces: 07/01/2002 3:47:42 PM <%= Time() %> Produces: 3:47:42 PM <%= FormatDateTime(strDate, 0) %> Produces: 07/01/2002 3:47:42 PM <%= FormatDateTime(strDate, 1) %> Produces: Monday, July 01, 2002 <%= FormatDateTime(strDate, 2) %> Produces: 07/01/2002 <%= FormatDateTime(strDate, 3) %> Produces: 3:47:42 PM <%= FormatDateTime(strDate, 4) %> Produces: 15:47 <%= Year(strDate) %> Produces: 2002 <%= Month(strDate) %> Produces: 7 <%= MonthName(Month(strDate)) %> Produces: July <%= MonthName(Month(strDate), 1) %> Produces: Jul <%= Day(strDate) %> Produces: 1 <%= WeekDay(strDate) %> Produces: 2 <%= WeekDayName(WeekDay(strDate)) %> Produces: Monday <%= WeekDayName(WeekDay(strDate), 1) %> Produces: Mon <%= Minute(strDate) %> Produces: 47 <%= Second(strDate) %> Produces: 42 <%= DateAdd("d", 1, strDate) %> Produces: 07/02/2002 3:47:42 PM <%= DateAdd("d", -1, strDate) %> Produces: 06/30/2002 3:47:42 PM <%= DateDiff("d", "1/1/2000", strDate) %> Produces: 912 <%= Day(strDate) & "/" & Month(strDate) & "/" & Year(strDate) %> Produces: 1/7/2002 <%= WeekDayName(WeekDay(strDate)) & ", " & Day(strDate) & " " & MonthName(Month(strDate)) & ", " & Year(strDate) %> Produces: Monday, 1 July, 2002
Post Comment
•
•
•
•
DaniWeb Marketplace (Sponsored Links)