Need help with querry or?

If something doesn't fit in any other forum then post it here.
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply
lion
L2j Veteran
L2j Veteran
Posts: 967
Joined: Sun Mar 11, 2007 7:49 pm
Location: Ukraine

Need help with querry or?

Post 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:
User avatar
Zealar
L2j Veteran
L2j Veteran
Posts: 1236
Joined: Sun Jul 15, 2007 10:29 am

Re: Need help with querry or?

Post by Zealar »

User avatar
janiii
L2j Veteran
L2j Veteran
Posts: 4269
Joined: Wed May 28, 2008 3:15 pm
Location: Slovakia

Re: Need help with querry or?

Post 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);
DO NOT EVEN TRY TO MESS WITH ME!
forum flOOder dancing dEVILoper
I don't give private support - PM will be ignored!
lion
L2j Veteran
L2j Veteran
Posts: 967
Joined: Sun Mar 11, 2007 7:49 pm
Location: Ukraine

Re: Need help with querry or?

Post by lion »

thank janiii :P You gave me the right direction for the work, i successfully converted the data :D
Post Reply