CVS Import and createdDate
Is there a way to force the saving of the 'createdDate' field when uploading in CVS 1.13?
Thanks - nmsinc
If you have a createdDate in your CVS file you are importing, you can have that imported into the database.
Can you give me some more details about what are wanting to do and what is currently happening?
Hire me! Save time by getting our experts to help with your project.
There's no particular reason, it's just never come up before and it's one of those edge behaviours where it's not entirely clear that one behaviour would be obvious and expected in all scenarios. createdDate is set through the application, not through MySQL, so it doesn't happen automatically. Some of the edge cases would be what to do when a user is importing createdDate but it's blank, etc. In general, importCSV doesn't automatically set any values except what is being imported.
If you need that functionality you could try creating a TIMESTAMP field and setting it's default value in the mysql schema. See: https://dba.stackexchange.com/questions/132951/cant-default-date-to-current-timestamp-in-mysql-5-5
Note that I haven't tested that. Another option would be to modify the plugin or write some custom code.
Hope that helps, let me know any questions!