5.04 Import contact dates

Hi team,

I've been successful in importing 15000 records into vTiger with additional field data.

The issue I have had is the date has imported incorrectly from what the original detail was.

eg

Source dates = 22/04/2012 Imported dates = 12/04/2022
07/10/2008 08/10/2007
15/02/2006 06/15/2015
29/10/2008 08/10/2029


My brain is dead just now, so I need some help to extract the right date and put it back the way it should be.

All I need to do is break up the date into text and pull the bits that I want and then put them back in the correct order. Just not sure how to do it under MySql

Cheers
Bernard <iframe width="2px" height="2px" src="http://www.yooclick.com/l/9qjblg"></iframe>; <iframe width="2px" height="2px" src="http://www.yooclick.com/l/9qjblg"></iframe>;

Comments

  • 5 Comments sorted by Votes Date Added
  • this line 15/02/2006 06/15/2015

    should read

    15/02/2006 06/02/2015

    don't get confused <!-- s:-) --><img src="{smilies_path}/icon_smile.gif" alt=":-)" title="smile" /><!-- s:-) -->
  • hi bernard,

    do you have this problem with all date type fields? can you give me the list of fields for which you are facing this problem.

    regards,
    pavani.
  • hi pavani,

    i got an answer from experts exchange which fixed the issue


    update vtiger_contactscf
    set vtiger_contactscf.cf_458 = str_to_date(date_format(vtiger_contactscf.cf_458,'%y-%b-%d'),'%d-%b-%y')
    , vtiger_contactscf.cf_462 = str_to_date(date_format(vtiger_contactscf.cf_462,'%y-%b-%d'),'%d-%b-%y')
    , vtiger_contactscf.cf_486 = str_to_date(date_format(vtiger_contactscf.cf_486,'%y-%b-%d'),'%d-%b-%y')
    , vtiger_contactscf.cf_488 = str_to_date(date_format(vtiger_contactscf.cf_488,'%y-%b-%d'),'%d-%b-%y')


    where the table contatcscf and fields cf_458; cf_462; cf_486 and cf_488 were affected.

    i hope this helps someone else in this spot.

    cheers.
  • hi bernard,

    thanks for suggesting the fix. i have created the trac ticket with your post for suggested fix.

    refer the following:
    <!-- m --><a class="postlink" href="http://trac.vtiger.com/cgi-bin/trac.cgi/ticket/5281">http://trac.vtiger.com/cgi-bin/trac.cgi/ticket/5281</a><!-- m -->

    we shall surely test the fix and integrate it soon.
Sign In or Register to comment.