![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I'm updating a db in which I have a column of Date/Time data type. The regional settings here for short date are: day / month / full year eg. 28/4/2005 It's easy enough for me to build a string with the appropriate date but how do I handle different regional settings for short date, such as: month / day / full year |
#3
| |||
| |||
|
|
Andrew Poulos wrote on 02 mei 2005 in comp.lang.javascript: I'm updating a db in which I have a column of Date/Time data type. The regional settings here for short date are: day / month / full year eg. 28/4/2005 It's easy enough for me to build a string with the appropriate date but how do I handle different regional settings for short date, such as: month / day / full year You don't have to handle those, as the client settings will do it for you. Perhaps however your idea of "handling" differs from mine. Please be more explicit about that. |
#4
| |||
| |||
|
|
The db with the current regional settings expects the date in this format dd/mm/yyyy. The best I can do with js is this: theDate.getDate() +"/"+ (theDate.getMonth()+1) +"/"+ theDate.getFullYear |
#5
| |||
| |||
|
|
Andrew Poulos wrote on 02 mei 2005 in comp.lang.javascript: The db with the current regional settings expects the date in this format dd/mm/yyyy. The best I can do with js is this: theDate.getDate() +"/"+ (theDate.getMonth()+1) +"/"+ theDate.getFullYear You don't specify the db engine you use, but common advice is to use yyyy/mm/dd in SQL string litterals of the type date. Ah, I get it (finally) I need to specifically nominate the date format |
#6
| |||
| |||
|
|
Evertjan. wrote: Andrew Poulos wrote on 02 mei 2005 in comp.lang.javascript: The db with the current regional settings expects the date in this format dd/mm/yyyy. The best I can do with js is this: theDate.getDate() +"/"+ (theDate.getMonth()+1) +"/"+ theDate.getFullYear You don't specify the db engine you use, but common advice is to use yyyy/mm/dd in SQL string litterals of the type date. Ah, I get it (finally) I need to specifically nominate the date format instead of simply choosing a preset. |
|
I suppose we are now talking serverside ASP jscript? |
|
What database engine are you using? |
#7
| |||
| |||
|
|
I'm updating a db in which I have a column of Date/Time data type. The regional settings here for short date are: day / month / full year eg. 28/4/2005 It's easy enough for me to build a string with the appropriate date but how do I handle different regional settings for short date, such as: month / day / full year |
![]() |
| Thread Tools | |
| Display Modes | |
| |