[ciapug] MS SQL timestamp to MySQL
Chris Hettinger
ciapug@cialug.org
Thu, 2 Oct 2003 14:35:59 -0500
I have a MS SQL datetime field with the format [yyyy-mm-dd hh:mm:ss.mmm] =
(milliseconds) that I need to compare to a date entered into my form as =
[mm/dd/yyyy]
I was going to use my inputted date string ex. 06/30/1977 and convert =
that into a MySQL time stamp 1977-06-03 00:00:00. Well that is when I =
noticed the ms SQL format for the date was different.
I asked a ms sql guy here and he recommended to me the CONVERT funtion =
that I can include in my SQL select statement to do the datetime =
conversion, to the format I want the date in, while building the records =
set that I will need to compare against. So I researched that but I =
haven't a good example of the syntax for the actual SQL statement.
Would anyone have a suggestion or could lend an example of how to use =
the CONVERT to do this?
-Chris Hettinger, Web Specialist
-IFMC/ENCOMPASS
-www.encompas.com
-(515) 279-8730
CONFIDENTIALITY NOTICE: This communication, including any attachment, =
may contain confidential information and is intended only for the =
individual or entity to whom it is addressed. Any review, =
dissemination, or copying of this communication by anyone other than the =
intended recipient is strictly prohibited. If you are not the intended =
recipient, please contact the sender by reply email, delete and destroy =
all copies of the original message.'