PDA

Click to See Complete Forum and Search --> : Displaying date and time


nmretd
Dec 6th, 2000, 07:18 AM
I am using the following function to display the date:
<% =FormatDateTime(Date(),1) %

The date is displayed as follows:
Wednesday, December 06, 2000

How can I change this so that it reads:
Wednesday December 6 2000. i.e remove the commas and leading zeros.

monte96
Dec 6th, 2000, 08:57 AM
Don't think there's a built in data format that meets your criteria so you'd most likely need to parse the string and do it yourself.

You can use the replace function to replace the ',' with '' and replace the ' 0' with ' '.

Which also means you need to put the date into a string variable first or you'll likely get a type mismatch error.