Results 1 to 2 of 2

Thread: Displaying date and time

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Sep 1999
    Location
    London, England
    Posts
    213
    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.

  2. #2
    Frenzied Member monte96's Avatar
    Join Date
    Sep 2000
    Location
    Somewhere in AZ
    Posts
    1,379
    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.
    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..

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width