|
 |
asp_databases thread: Dates
Message #1 by Nikos <pappas@c...> on Wed, 29 Jan 2003 01:57:48 +0200
|
|
Hi
Ken a question for you please
www.adopenstatic.com/faq/dateswithaccess.asp
The following suggestion and the above link solved a time consuming problem
for me.
Use ISO-style dates (yyyy/mm/dd or yyyy-mm-dd or yyyymmdd) for
inserting/updating/querying
Is it the same for SQL Server
or just because I am using adp project?
( It is a vb application not asp )
Thanks in advance
Best regards
NIkos
Message #2 by "Ken Schaefer" <ken@a...> on Wed, 29 Jan 2003 13:50:54 +1100
|
|
If you are using inline SQL statements, then dates should be formatted in
ISO format for SQL Server as well: yyyymmdd hh:mm:ss [AM | PM] (for example)
If you are using ADO parameter objects, then any string that can be coerced
into a date format is OK (you just need to make sure all your various
regional settings are correct). I'd stick with ISO style formatting.
Personally I recommend yyyymmdd for any database, since it means you avoid
all problems when you move servers, change settings, upgrade databases etc.
Cheers
Ken
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "Nikos" <pappas@c...>
Subject: [asp_databases] Dates
: Ken a question for you please
: www.adopenstatic.com/faq/dateswithaccess.asp
: The following suggestion and the above link solved a time consuming
problem
: for me.
:
: Use ISO-style dates (yyyy/mm/dd or yyyy-mm-dd or yyyymmdd) for
: inserting/updating/querying
:
: Is it the same for SQL Server
: or just because I am using adp project?
: ( It is a vb application not asp )
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Message #3 by Nikos <pappas@c...> on Wed, 29 Jan 2003 11:20:53 +0200
|
|
Thank you for your support Ken
All the best
Nikos
At 04:50 29/01/2003, you wrote:
>If you are using inline SQL statements, then dates should be formatted in
>ISO format for SQL Server as well: yyyymmdd hh:mm:ss [AM | PM] (for example)
>
>If you are using ADO parameter objects, then any string that can be coerced
>into a date format is OK (you just need to make sure all your various
>regional settings are correct). I'd stick with ISO style formatting.
>
>Personally I recommend yyyymmdd for any database, since it means you avoid
>all problems when you move servers, change settings, upgrade databases etc.
>
>Cheers
>Ken
>
>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>From: "Nikos" <pappas@c...>
>Subject: [asp_databases] Dates
>
>
>: Ken a question for you please
>: www.adopenstatic.com/faq/dateswithaccess.asp
>: The following suggestion and the above link solved a time consuming
>problem
>: for me.
>:
>: Use ISO-style dates (yyyy/mm/dd or yyyy-mm-dd or yyyymmdd) for
>: inserting/updating/querying
>:
>: Is it the same for SQL Server
>: or just because I am using adp project?
>: ( It is a vb application not asp )
>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
>
|
|
 |