Detail Focused
Monday, January 26, 2009
Date function in mysql
There is no to_date() function in mysql, which I always use in oracle.
To get a date from string, you can use DATE()
SELECT DATE('2003-12-31 01:02:03');
-> '2003-12-31'
To get the current date, use
CURDATE()
or
SYSDATE()
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment