View previous topic :: View next topic |
Author |
Message |
jon
Joined: 01 Oct 2004 Posts: 40
|
Posted: Thu Oct 21, 2004 12:12 pm Post subject: Formatting date/time in ASP |
|
|
Hi,
I'm extracting several values from my Access database and one of them is storing date/time value. Is there a way to display this date/time value in different formats on my ASP page. Is there an ASP date/time formatting function?
jon |
|
Back to top |
|
|
pepper
Joined: 10 Oct 2004 Posts: 5
|
Posted: Thu Oct 21, 2004 1:48 pm Post subject: |
|
|
Hey Jon,
There is a VBScript function called FormatDateTime, which you can use to format the date field in your ASP page. Here is how to use it:
Code: | strTime = FormatDateTime("10/21/2004", vbGeneralDate) |
There are 5 constants that you can use as a second parameter of the function (vbGeneralDate, vbLongDate, vbShortDate, vbLongTime, vbShortTime).
I hope this helps. _________________ Hot Pepper :/ |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2002 phpBB Group
|