Changing the format of a date attribute
Patric
patricrt at gmail.com
Tue Dec 8 14:43:51 CET 2009
Alan DeKok wrote:
> Patric wrote:
>> Is there any way for me to get my FreeRADIUS-Acct-Session-Start-Time
>> attribute value into that date format?
>
> http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html#function_from-unixtime
You sir are a genius :) It didnt even occur to me to do it in the SQL
statement...
So now I have the following:
STR_TO_DATE('%{FreeRADIUS-Acct-Session-Start-Time}', '%M %d %Y %H:%i:%s'))
And that converts "Dec 8 2009 09:14:14 GMT" into "2009-12-08 09:14:14"
Thanks so much!
Patric
More information about the Freeradius-Users
mailing list