Ionut A. Tudor
asked on
MySQL GET_FORMAT() not working as expecte
Hello,
I'm trying to update one datetime field based on other datetime filed that is bigger than 1 day than the other
This is my query:
UPDATE TABLE SET `field`='amyvalue' WHERE datetime_field < GET_FORMAT(UNIX_TIMESTAMP( `other_dat etime_fiel d`)-86400, 'ISO')
I'm getting this error:
Error Code : 1064
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'UNIX_TIMESTAMP(`other_dat etime_fiel d`)-86400, 'ISO')' at line 1
How can I use GET_FORMAT() to get it to work properly ?
Thank you
I'm trying to update one datetime field based on other datetime filed that is bigger than 1 day than the other
This is my query:
UPDATE TABLE SET `field`='amyvalue' WHERE datetime_field < GET_FORMAT(UNIX_TIMESTAMP(
I'm getting this error:
Error Code : 1064
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'UNIX_TIMESTAMP(`other_dat
How can I use GET_FORMAT() to get it to work properly ?
Thank you
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Open in new window