Posted by Gordon Burditt on 09/30/94 11:28
>> Why doesn't this return anything ?
>>
>> SELECT DATE_SUB('FROM_DAYS(TO_DAYS(2005-09-28 18:04:19))', INTERVAL 6 DAY)
'FROM_DAYS(TO_DAYS(2005-09-28 18:04:19))' is not a valid date.
Valid dates don't have a bunch of underscores, parentheses, and alphabetic
junk in them.
You might want:
SELECT DATE_SUB(FROM_DAYS(TO_DAYS('2005-09-28 18:04:19')), INTERVAL 6 DAY)
but I'm not sure I understand what the point of the FROM_DAYS and TO_DAYS
calls is.
Gordon L. Burditt
[Back to original message]
|