|
-
Sep 20th, 2000, 11:36 AM
#1
Thread Starter
Addicted Member
Hello everybody
Can anybody tell me how to format the date function in VBscript? Currently it is in 'dd/mm/yy' format but I need to use dd/mm/yyyy. The format function in VB is not supported in VBscript, can anyone help?
ie
Daily = Date 'Works fine
Daily = format(Date, "dd/mm/yyyy") 'Dosn't work
Cheers 'n' beers
Skeen
"It wasn't the booze that made me snooze, It was the Gin that did me in!"
-
Sep 20th, 2000, 01:02 PM
#2
Hyperactive Member
Try formatdatetime(date, 3). What sucks is it looks at your computer's regional settings for the format.
-
Sep 20th, 2000, 06:50 PM
#3
Frenzied Member
Yes, you will need to make sure that the server is set up to use MM/dd/yyyy in Control Panel/Regional Settings.
oOOo--oOOo
__ /\/\onte96
oOOo--oOOo
Senior Programmer/Analyst
MCP
[email protected]
[email protected]
Your results may vary.. some restrictions may apply.. pricing and participation may vary.. not available in all states.. professional driver closed course..quantities limited..
-
Sep 21st, 2000, 02:34 AM
#4
Thread Starter
Addicted Member
Cheers Guys
Nice 1 lads, Thanx for the tip.
Skeen.
"It wasn't the booze that made me snooze, It was the Gin that did me in!"
-
Sep 21st, 2000, 05:54 PM
#5
Conquistador
they have some examples at http://www.brinkster.com
click "CODE BANK" in the menu thingo
-
Sep 22nd, 2000, 10:02 AM
#6
New Member
Re: Cheers Guys
Originally posted by Skeen
Nice 1 lads, Thanx for the tip.
Skeen.
Hi, Skeen
I had the same problem some years ago. I was programming in Argentina (dmy format) but the scripts were run in a srever located USA (MDY format) and in a test server in Argentina (DMY format).
Also, client computers were random set up.
So I wrote a function (sorry I don't have it any more) that extracted the D, M and Y parts of the date in three integers and then formatted the integers in the order I wanted.
It worked with both kind of setups.
-
Sep 25th, 2000, 04:45 AM
#7
Thread Starter
Addicted Member
I've been messing around with this date thing,
To illiminate client regional settings date must be formatted in code, and I've sussed that its case sensitive
ie:
ToDate('" & StartDateTime & "', 'dd/MM/yyyy HH24:MI:SS')
Will fromate a date day/month/year and 24Hr Time
ie "25/09/2000 18:46:33"
Cheers for all the tips everyone!
Nice1
Skeen.
"It wasn't the booze that made me snooze, It was the Gin that did me in!"
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|