SQL Server Date Time format.

2 views
Skip to first unread message

Paul Kinlan

unread,
Oct 16, 2008, 10:57:53 AM10/16/08
to liverpoolus...@googlegroups.com
Hi Guys,

Is there anyway to programattically determine the datetime format of a SQL server box.  I ask because I am not using parameters to execute a data reader but an already formed sql string which I inject my date string criteria into and I need to ensure that my date is in the correct format.

Cheers,
Paul.

Thom Shannon

unread,
Oct 16, 2008, 11:04:29 AM10/16/08
to liverpoolus...@googlegroups.com
if you're struggling with things like the US/UK issue, you can use an
ansi formated date and it will parse it ok.

I think you can also set a locale per connection that changes date
formatting.

--
*** OPEN COFFEE - http://upcoming.yahoo.com/group/3263/ ***

Terms & Conditions Apply: http://www.glow-internet.com/home/terms.aspx

Glow New Media
t: 0151 707 9770
m: 07730 987 574
www.glow-internet.com

Suite 712 Gostins Building
32-36 Hanover Street
Liverpool
L1 4LN

Map: http://tinyurl.com/2f5nxd

Paul Kinlan

unread,
Oct 16, 2008, 11:08:57 AM10/16/08
to liverpoolus...@googlegroups.com
Cheers,

I tried out the ansi date format and it seems to work....  Do you know the setting on the connection string, I am having trouble finding it.

Paul

2008/10/16 Thom Shannon <th...@glow-internet.com>
Reply all
Reply to author
Forward
0 new messages