Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Date Format
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Date Format

 Post Reply Post Reply
Author
zMaestro View Drop Down
Senior Member
Senior Member


Joined: 11 May 2003
Location: Egypt
Status: Offline
Points: 1183
Post Options Post Options   Thanks (0) Thanks(0)   Quote zMaestro Quote  Post ReplyReply Direct Link To This Post Topic: Date Format
    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.

Back to Top
michael View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 April 2002
Location: United States
Status: Offline
Points: 4670
Post Options Post Options   Thanks (0) Thanks(0)   Quote michael Quote  Post ReplyReply Direct Link To This Post Posted: 11 May 2003 at 6:19pm
FormatDateTime(dateVariable, vbLongDate)
Back to Top
zMaestro View Drop Down
Senior Member
Senior Member


Joined: 11 May 2003
Location: Egypt
Status: Offline
Points: 1183
Post Options Post Options   Thanks (0) Thanks(0)   Quote zMaestro Quote  Post ReplyReply Direct Link To This Post 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.

Back to Top
ultramods View Drop Down
Groupie
Groupie
Avatar

Joined: 08 January 2003
Location: Scotland
Status: Offline
Points: 146
Post Options Post Options   Thanks (0) Thanks(0)   Quote ultramods Quote  Post ReplyReply Direct Link To This Post Posted: 12 May 2003 at 5:40am
Back to Top
Musicboffin View Drop Down
Newbie
Newbie


Joined: 21 October 2002
Location: United Kingdom
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote Musicboffin Quote  Post ReplyReply Direct Link To This Post 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

Back to Top
Musicboffin View Drop Down
Newbie
Newbie


Joined: 21 October 2002
Location: United Kingdom
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote Musicboffin Quote  Post ReplyReply Direct Link To This Post Posted: 12 June 2003 at 3:18am

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

<%@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,

Back to Top
ljamal View Drop Down
Mod Builder Group
Mod Builder Group


Joined: 16 April 2003
Status: Offline
Points: 888
Post Options Post Options   Thanks (0) Thanks(0)   Quote ljamal Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.