• Resolved vkumar14

    (@vkumar14)


    I have imported some post with old post date. I want to keep the post date , as it is in the csv file. I have kept the old date in post_date column. The post date format is 2014-09-06 12:05:07 . I have also tried Sep 6, 2014 12:05 .

    Is their any other format that will be supported ? I can see that in the export csv file, the post_date format is 2014-09-06 12:05:07 .

    https://www.ads-software.com/plugins/wp-ultimate-csv-importer/

Viewing 15 replies - 16 through 30 (of 33 total)
  • I’m afraid this is no different – sample import log entry:

    Created Post_ID – 53367 – success , Author – not found (assigned to ) , , , Date – 1970-01-01 00:00:00 , , Status – publish , Verify Here – Web View | Admin View

    I’m not surprised by this – we had already established that your sample.csv doesn’t import correctly on my system and I’m sure it does on yours, we’ve just confirmed that the problem is at my end which is what I had assumed.

    There must be something on my setup that is conflicting with your plugin – where should I look? I’ve just deactivated all the other plugins and tried again, it still doesn’t work. What else can I try? Thanks.

    Can you please create a ticket in our help desk using ([email protected]).

    Thanks.

    OK, done.

    Plugin Author smackcoders

    (@smackcoders)

    Your support has been responded, i take this as resolved. Leave your feedback here.

    Support has responded but they’ve only suggested changing the format back to the one I started with which does not work and which led me to raise this problem in the first place. I’ve asked them to re-read this thread.

    To repeat:
    Importing post_date in the format YYYY-MM-DD HH:MM causes every record to be set to 1970-01-01 00:00. So does every other format that has been suggested in this thread.

    Importing your sample.csv file also sets every post_date to 1970-01-01 00:00

    You were able to import some of my data correctly on your test system

    There must therefore be some incorrect setting or conflicting code on my WP system. I’ve disabled all other plug-ins, don’t know what else to try.

    The problem is NOT resolved and I would very much like your help – thanks.

    Plugin Author smackcoders

    (@smackcoders)

    @bvisick, we tested the provided source and found a solution. We have attached the findings as snaps in you mail. Give a try and update us.

    I had already seen the mail, I tried it and I responded already – it doesn’t work! Please see my previous post.

    It seems your plugin no longer works on my site. I will have to update the post_date field directly using SQL while I look for another import solution. I’m sorry you can’t fix it but thanks for trying,

    Thread Starter vkumar14

    (@vkumar14)

    I’m having the same problem.

    Hi vkumar14, I found your report of the problem when it first arose for me, sorry for hijacking the thread! I found a workaround which was to load the data using the plugin, then use PHPMyAdmin to alter the dates in SQL – not very convenient but at least it gets around the bug.

    Thread Starter vkumar14

    (@vkumar14)

    How the use this PHPMyAdmin technique ?

    I have about 2000 posts that I load into a custom type and want each one to have a unique datestamp so that I can navigate by previous/next – I’ve found that if there are duplicate datestamps then WP’s navigation is random and unpredictable. I solved the plugin’s problem by running the following SQL commands:

    set @x = ‘2014-09-01 00:00’;
    set @s = 52981;
    UPDATE wp_posts set post_date = DATE_ADD(@x,INTERVAL id-@s MINUTE),post_date_gmt = DATE_ADD(@x,INTERVAL id-@s MINUTE) where post_type=’MyCustomPostType’;
    SELECT id, post_date, post_date_gmt FROM wp_posts WHERE post_type = ‘MyCustomPostType’ order by id;

    @x is the datestamp I want for the first post and @s is the post id for the first post in my system – you should change both of these.

    The UPDATE command changes both post_date and post_date_gmt to keep them in step. It uses the start datetime (@x) and increments it by the current post id minus the id of the first post (@s) so each post has a datestamp one minute later than the previous one. The final SELECT is just so I can see what’s happened.

    I hope this is helpful, it’s a shame the plugin needs this extra step.

    Plugin Author smackcoders

    (@smackcoders)

    Update your plugin to version 3.6.6 will fix these issues.

    Do you mean 3.6.6? Latest version I can see is 3.6.5, please confirm – thanks.

    Is 3.6.6 being released soon? I’m having this same issue and looking forward to the update.
    thanks

    I am also having issues with date format. My format is the same as in the Sample.csv – is there a fix for this?

Viewing 15 replies - 16 through 30 (of 33 total)
  • The topic ‘post_date is not working’ is closed to new replies.