No announcement yet.

problem with date-time --> unixtime (db conversion)

  • Filter
  • Time
  • Show
Clear All
new posts

  • problem with date-time --> unixtime (db conversion)


    I'm making a script based on the xmb --> vB2 script to import all my users, posts and topics from a package where I couldn't find a script for. The user part is almost okay but there is one thing wrong.

    Currently my forumsoftware saves the day and time joined like: 2002-01-05 00:00:00 and the birtday like: 1981-08-11

    For the first I had made this

    	if($user['user_joined']) {
    	  $unixtime = strtotime(str_replace(",", "", $user['user_joined']));
    	 $importuser['joindate'] = date("y-m-d h:i:s", $unixtime);
    But this gives at all the users the number 2 in their joined table. (I found this is the xmb-script and changed it to my needs.) Maybe someone who can help me?

    I left the birthday but maybe there is a fix for too?

  • #2
    For help with custom scripts, please ask over at Thanks.
    Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
    Change CKEditor Colors to Match Style (for 4.1.4 and above)

    Steve Machol Photography

    Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


    widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.