This topic is locked

Change date format

8/22/2004 12:43:56 PM
ASPRunnerPro General questions
author

Is there a way to change the date format from mm-dd-yyyy to other formats, if yes how for example to the format dd-mmm-yy (22-Aug-04)?
Thanks

Sergey Kornilov admin 8/28/2004

Hi,
you can change date format in Regional Options on your local box (Start->Settings->Control Panel->Regional Options->Date).

500152 8/30/2004

How about how do we in CODE change how the date is saved to the Database.

I'm looking to save the date as mm/dd/yy (two digit year)
Thanks, Tom

500153 8/30/2004

How about how do we in CODE change how the date is saved to the Database.

I'm looking to save the date as mm/dd/yy
I mean...I looking to save two digit month and two digit year. If they are not two digit, it messes with the sort functionality
Thanks, Tom

500154 8/30/2004

would me nice to be able to force the date to be saved as:
two digit month, day, and year

Sergey Kornilov admin 8/30/2004

Hi,
you need to understand the difference between database date format and display format. In most cases dates are stored in the database as a number of seconds after midnight January 1st, 1970. This means you cannot control database date format. All you can do is to control date values appearance on the ASP page. For this purpose you can choose between set of predefined date formats in ASPRunner.