DateTime vs. Date

Byrd

Member
Is there anyway to make the default MySQL setting for the Date element to be "Date" instead of "Datetime" in the structure. Right now I have to create the date element. Save it, then go into PHP MyAdmin, go into the structure of the table, edit the element and manually change it to "Date".

No matter how I save default in the Date element, without time, taking out the H M values, etc. It continually adds the value of the time, unless I go in and manually change to a "Date" structure.
 
Nope. It'll always be a DATETIME field in MySQL, and will always save a time component, regardless of whether you specify the time part in your formats. There are reasons we do this,.

If you really need just date, then you can do what what you are doing, athough you will need to set the "Alter field types" on your List advanced settings to "No", so we dont change ti back to DATETIME next time you save the element settings in Fabrik.

Just don't be surprised if your dates start acting weird with regards to time zones. Which may or may not be an issue, depending on your usage of the element.

-- hugh
 
Thank you. And thank you for pointing out the Alter Field Types option. That was my next question.

Could there be a separate plugin element that did provide everything in the current date element, minus the time, and saved as a "Date" structure?
 
Old discussion (I assume it's a question of "somebody has to do it";)).
At the moment there is the birthday element using DATE.
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top