|  | Posted by Erland Sommarskog on 06/11/14 11:33 
laurenq uantrell (laurenquantrell@hotmail.com) writes:> On the client side, it's pretty simple since date() remains in the
 > chosen format as long as I never format it, so Nov.29, 2005 remains
 > 29/11/2005 or 11/29/2005 depending on the regional format - the
 > DATEDIFF on the client side will always calculate correctly. What I
 > need to do is to translate the client date to UTC/GMT and pass that as
 > an integer to the server to handle the time zone differences as I have
 > shown below:
 
 Or just pass it as a parameter to your queries, and the client API
 will convert the date to a binary format. (Which accidently is based
 on the number of days since 1900-01-01.)
 
 Your diff stuff sounds overly complex to me.
 
 
 --
 Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
 
 Books Online for SQL Server 2005 at
 http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
 Books Online for SQL Server 2000 at
 http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
  Navigation: [Reply to this message] |