Print Page | Close Window

Date Format

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Database Discussion
Forum Description: Discussion and chat on database related topics.
URL: https://forums.webwiz.net/forum_posts.asp?TID=2608
Printed Date: 28 March 2026 at 7:54am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Date Format
Posted By: zMaestro
Subject: Date Format
Date Posted: 11 May 2003 at 2:25pm

I have a database, which contains a field for Date/Time.

The Field contains the date 19/9/2001,
but I want to read it from an asp as : 19 September, 2001.

How can I format the date to the long date format?.

Thanks.




Replies:
Posted By: michael
Date Posted: 11 May 2003 at 6:19pm
FormatDateTime(dateVariable, vbLongDate)

-------------
http://baumannphoto.com" rel="nofollow - Blog | http://mpgtracker.com" rel="nofollow - MPG Tracker


Posted By: zMaestro
Date Posted: 12 May 2003 at 3:29am

Wonderful... It worked

The Date appeared like: Wednesday, September 19, 2001

FormatDateTime(r("Day"), vbLongDate)

How can i write the Medium Date format (remove the day)?
i tried vbshortDate and it worked, but vbMediumDate didn't work.

Thanks michael.



Posted By: ultramods
Date Posted: 12 May 2003 at 5:40am

try looking here:

http://www.brinkster.com/Articles/#date - http://www.brinkster.com/Articles/#date



Posted By: Musicboffin
Date Posted: 12 June 2003 at 3:03am

Hi,

Sorry to dig up an old thread, but is it possible to format the date to the UK format rather than the US format?  EG. This Wednesday, 19 September, 2001 instead of Wednesday, September 19, 2001. 

Usually, it is possible to fix things like this by changing to order of each date componenet (as in Weekday, Day Month, Year) but it doesn't appear possible here. 

Thanks,

Luke



Posted By: Musicboffin
Date Posted: 12 June 2003 at 3:18am

Ah, I have worked out how to change the formast now using:

<mailto:%@LANGUAGE="VBscript'>%@LANGUAGE="VBSCRIPT" LCID=2057 %>

but the day has now gone.  Is it possible to have the day as well? Or am I pushing my luck?

Thanks,



Posted By: ljamal
Date Posted: 12 June 2003 at 8:42am
I just use the following function

function DateFormat (dteDate)

DateFormat = Day(dteDate)&" "&MonthName(Month(dteDate))&" "&Year(dteDate)
end function

-------------
L. Jamal Walton

http://www.ljamal.com/" rel="nofollow - L. Jamal Inc : Web/ Print Design and ASP Programming



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net