Date fields do not import

3 years 3 months ago #321836 by eriknz
Date fields do not import was created by eriknz
I am using CBjuice2 to transfer my CB database from an old site to a new site. Everything works fine (after some trial and error) but all columns that contain a date or datetime field are not imported. They have correct values in the csv file but remain blank in my new site. On both sites the date format in CB is set to yyyy-mm-dd. In the (exported) csv the format is 8/12/2015 though. But changing to that setting in the new site before import doesn't make a difference.
There is no error message in CBJuice.
I use CBJUICE V2-3.3.2 Beta version, CB 2.4.7+build.2020.11.19.14.24.58.59e8c0858 and Joomla 3.9.23.

Anybody with ideas how to fix this?
I would really appreciate some help.
Thanks.
Erik

Please Log in to join the conversation.

3 years 3 months ago #321838 by jciconsult
Replied by jciconsult on topic Date fields do not import
Try setting the date as a string in your CSV file. You need to make sure that it is not the internal representation of the date in EXCEL. It should work.

Please Log in to join the conversation.

3 years 3 months ago #321839 by eriknz
Replied by eriknz on topic Date fields do not import
How do I set it as string? If I change the excel format (e.g. "General" or anything else than date) the value changes. You mean to put the content in quotes?

Please Log in to join the conversation.

3 years 3 months ago #321841 by jciconsult
Replied by jciconsult on topic Date fields do not import
In the working examples on our site, we are using records like
Sabrina,Afroz,safroz@fao-on.org,Toronto,sabrina.afroz,Corporate,1,National,Financial Accountability Office,0,2022-03-31,1,1,National,2020-12-01,Corporate Discount 30

Note The date is separated by "-" not "/"
The following user(s) said Thank You: eriknz

Please Log in to join the conversation.

3 years 3 months ago #321842 by eriknz
Replied by eriknz on topic Date fields do not import
The only option my Excel gives for dates with "-" as separator is yyyy-mm-dd. That is accepted in the csv. When I change the date format in CB accordingly then the date is indeed imported! I tried this with one test record.
So this works.
Thanks very much for your support.

Erik

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.199 seconds

Facebook Twitter LinkedIn