Importing: Date Format and mapping help
-
Hi,
I am moving an old site to WP and bbPress and need to convert my old forums. I understand I need to use the example.php in the converter folder and write a converter for each old forum – there are 3 I am gong to convert.
And wouldn’t you know it, the 3 different forums use 3 different date formats!
Here they are
1415922411
2004-09-13 19:25:59
20080407181855From looking around in all of the converter files I see that forum dates are done 2 ways
In example converter – I am guessing that I would use this format to convert the date like 20080407181855 ?
// Forum dates.
$this->field_map[] = array(
'to_type' => 'forum',
'to_fieldname' => 'post_date',
'default' => date('Y-m-d H:i:s')
);
In vanilla converter – I am guessing I would use this format to convert the date like 2004-09-13 19:25:59 ?
// Forum dates.
$this->field_map[] = array(
'from_tablename' => 'Category',
'from_fieldname' => 'DateInserted',
'to_type' => 'forum',
'to_fieldname' => 'post_date',
);
Anyone know how I can convert a date such as 1415922411 to the correct date format – which I am guessing is Y-m-d H:i:s?
Thank you for your time.
- You must be logged in to reply to this topic.