Padding Padding
Janet
Systems
 Register  Login 
Telephone  01628 566 178
Website Design, Hosting and Software Services
  Search 
Padding
corner Padding corner
Padding Padding
corner Padding corner
 ASP Articles

ASP has a number of commands relating to representing the date and time.  Listed below are some of them, together with a description.

date()
Output is like: 17/2/2003  (format of the date will be dependant upon the settings of the server)

now()
Output is like: 17/2/2003 1:28:18 PM (format of the date will be dependant upon the settings of the server)

Day(dateValue)
Returns the day number.

WeekDayName(Day(dateValue))
Returns the name of the specified day.

Month(dateValue))
Returns the month number.

MonthName(Month(dateValue))
Returns the month name.

Year(dateValue)
Returns the year part of the date.

Over-ruling Server Settings

We are able to over-rule the server settings to specify the format in which the date will be presented.  A number of these are illustrated below:

Session.LCID = 0413
results in dd/mm/yyyy format

FormatDateTime(date(), vbGeneralDate)
17/2/03 12:12:38 PM

FormatDateTime(curDate, vbLongDate)
Monday, 17 February , 2003

FormatDateTime(curDate, vbShortDate)
17/2/03

FormatDateTime(curDate, vbLongTime)
12:12:38 PM

FormatDateTime(curDate, vbShortTime)
12:12


This article viewed: 1193 times Back

Copyright © 2004-2007 Janet Systems Ltd.

 Print   

DotNetNuke Website design and hosting from £15.00 per month. More...

Looking for a website design company in the Thames Valley, call us on 01628 566178

DotNetNuke Modules
DotNetNuke Modules availalble from Janet Systems

DotNetNuke Skins
DotNetNukeSkins.gif

from Janet Systems

Padding
Copyright 2002-2008 Janet Systems Ltd.   Terms Of Use  Privacy Statement Tuesday, May 13, 2008