The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
(MYSQL) Converting a populated column of datetime to timestamp
Hey i have a column in my DB thats a datetime i need to convert all the records on mass to a timestamp.
ive got well over 2500 records like this so going through them one by one is not an option. anyone able to help me with a php script that when run would convert them to timestamp? i need to convert a subscription addon for another forum software to VB and this is the only thing that wont match Any help much appreciated Dub |
#2
|
|||
|
|||
you would probably enjoy this function:
http://us2.php.net/mktime You'll have to break your datetime's apart using explode() or something, but you can construct your actual timestamps using mktime() |
#3
|
|||
|
|||
What is the columntype of the old database, and please provide some example values.
Also see: http://dev.mysql.com/doc/refman/4.1/en/datetime.html http://dev.mysql.com/doc/refman/4.1/...functions.html |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|