5 posts by 3 authors in: Forums > CMS Builder: Plugins & Add-ons
Last Post: June 14   (RSS)

By nmsinc - June 7 - edited: June 7

Is there a way to force the saving of the 'createdDate' field when uploading in CVS 1.13?

Thanks - nmsinc

Hi,

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?

Thanks!

---------------------------------------------------
Cheers,
Damon Edis
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Hi nmsinc, 

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!

Dave Edis - Senior Developer
interactivetools.com

Thanks Dave - appreciate the feedback. I will try some custom code in the plugin!

nmsinc