Totara Learn Open Discussions

Importing entries into database activity - date format

 
CarsonMatthew
Importing entries into database activity - date format
CarsonMatthew 发表于 2021年05月19日 Wednesday 22:06
 

Hi all

I'm trying to import entries into the database activity. Every field is working except for the date field. My csv file has the date field in dd/mm/yyyy format, however it will always import as Jan 1 1970.

Even if I put an entry in manually, export that entry out, and then reimport that entry, it will import as Jan 1 1970.

Is there any way to import the date field and have the value as it is in the csv file?

Thanks

- Matt

Craig Eves
Re: Importing entries into database activity - date format
Eves (Totara Support)Craig 发表于 2021年05月20日 Thursday 14:56
小组 Totara

Hi Matthew

Can you try using the Unix timestamp for the date you want and format this as a number in the csv file .

This is inconsistent with other areas but the database activity is not on the roadmap to improve in the near future.

Regards


CarsonMatthew
Re: Importing entries into database activity - date format
CarsonMatthew 发表于 2021年05月20日 Thursday 20:18
 

Thanks Craig, that worked :)


All good that it's not in the roadmap, just needed a solution!

- Matt