Monday, July 28, 2008

SQL DateTime British / U.S. Conversion Issue

When working with SQL Strings to input a DataTime in an application, an issue came up due to the month/day difference between British and U.S. conventions. The way around this issue is to use a paramaterized query, however there may be some situations when this is not possible (Web Service requires a string date parameter). The string format conversion I used for the DateTime is as follows:

yyyy-MM-dd HH:MM:ss.mmm

This seems to work except there is an issue with time. I haven't figured out what the issue is yet, but I wanted to post the format for anyone looking to resolve this issue.

No comments:

Check This Out!

More Links to Good Information