Posted by Todd on 10/08/06 21:00
The problem with your situation is that the dates are not stored in SQL
Server in strings like mm/dd/yyyy or dd/mm/yyy. The dates are stored as the
number of days before or after 1/1/1900. Times are stored in a similar
manner.
See http://msdn2.microsoft.com/en-us/library/ms187819.aspx
I suppose you could write some form of function that does a regexp check and
looks for date values on returned fields and then re-writes the date fields
in the format you want. This is an UGLY hack and would cause some overhead,
but it could work. The other option is that you could store your dates in a
char field and then you will get them back the way you want. Your would
have to do some checking on the date fields when entered to make sure they
are valid.
I don't know if either or these would work for you or not.
Good luck!
Navigation:
[Reply to this message]
|