Page 1 of 1

Need help with querry or?

Posted: Sat Jan 09, 2010 10:08 am
by lion
I need help. I use on site Account Manager and on table accounts i have column created_time like '2009-01-16 14:32:56' . How i can remake this time on unix time for use in table characters for createTime (for Character birthday)? need same tools or? because redo this manually it's crazy :mrgreen:

Re: Need help with querry or?

Posted: Sat Jan 09, 2010 10:55 am
by Zealar

Re: Need help with querry or?

Posted: Sat Jan 09, 2010 11:39 am
by janiii
check this function:

Code: Select all

SELECT UNIX_TIMESTAMP('2005-10-04 22:23:00');
maybe this could work, not tested, test on some test data before applying to your database!

Code: Select all

UPDATE accounts SET created_time = UNIX_TIMESTAMP(created_time);

Re: Need help with querry or?

Posted: Sat Jan 09, 2010 12:10 pm
by lion
thank janiii :P You gave me the right direction for the work, i successfully converted the data :D