Sayunixtime time format

I am pulling the following datetime from mysql and want to have asterisk read ir.

2014-04-09 00:00:16

This is what asterisk does with it

-- Executing [s@macro-playback:26] SayUnixTime("SIP/2580-00000001", "2014-04-09 00:00:16") in new stack
-- <SIP/2580-00000001> Playing 'digits/19.alaw' (language '')
-- <SIP/2580-00000001> Playing 'digits/70.alaw' (language '')
-- <SIP/2580-00000001> Playing 'digits/mon-0.alaw' (language '')
-- <SIP/2580-00000001> Playing 'digits/mon-0.alaw' (language '')
-- <SIP/2580-00000001> Playing 'digits/h-1.alaw' (language '')
-- <SIP/2580-00000001> Playing 'digits/19.alaw' (language '')
-- <SIP/2580-00000001> Playing 'digits/70.alaw' (language '')
-- <SIP/2580-00000001> Playing 'digits/oh.alaw' (language '')
-- <SIP/2580-00000001> Playing 'digits/1.alaw' (language '')
-- <SIP/2580-00000001> Playing 'digits/30.alaw' (language '')
-- <SIP/2580-00000001> Playing 'digits/3.alaw' (language '')
-- <SIP/2580-00000001> Playing 'digits/30.alaw' (language '')
-- <SIP/2580-00000001> Playing 'digits/4.alaw' (language '')

I suspect I’m not passing the date and time to Asterisk in the correct format. Is there an alternative solution to reading mysql date time?

try passing the time in a unixtime format to the app SayUnixTime()

That would require a conversion of what I have first or an alternative function to read what I have

mysql> SELECT UNIX_TIMESTAMP(‘2007-11-30 10:30:19’);
-> 1196440219

dev.mysql.com/doc/refman/5.5/en/ … tions.html

I may well use your answer as I’m keen to keep the dial plan as short as possible.

I just found this function in the last 10 mins in asterisk which does the job very well.

same => n,Set(calldate=${STRPTIME(${start},%Y-%m-%d %H:%M:%S)})

Probably going to use your answer.

Many thanks