I have a "time" field formatted as hhmm however the hours field does not
add leading zeros. eg 09:01 is simple 901.
I want to get a standard format time out but,
mysql> str_to_date('901','%k%i')
gives a NULL result.
A further test reveals that I can covert into the desired format but not
back.
mysql> select TIME_FORMAT('8:53:00', '%k%i') \G
*************************** 1. row ***************************
TIME_FORMAT('8:53:00', '%k%i'): 853
1 row in set (0.00 sec)
mysql> SELECT str_to_date(TIME_FORMAT('8:53:00', '%k%i'), '%k%i') \G
*************************** 1. row ***************************
str_to_date(TIME_FORMAT('8:53:00', '%k%i'), '%k%i'): NULL
1 row in set (0.00 sec)
Is there any way out?
Danny
mysql 4.1.3-beta-standard
Magdalena Ridge Observatory
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]