View Single Post
Old 11-27-2022, 06:13 PM  
sarettah
see you later, I'm gone
 
Industry Role:
Join Date: Oct 2002
Posts: 14,063
Quote:
Originally Posted by Publisher Bucks View Post
Because when they publish they are published on specific dates, which correlate to the writing process and publication date of previous titles.

Maybe I'm not fully understanding what you are saying about storing the date? Doesnt that just do the same thing when stored?

A date type field in the database is for storing a date. It is just one column, it does not split it into 3 pieces as you described.

Quote:
I have a table that contains the following columns in it:

Month
Day
Year
https://dev.mysql.com/doc/refman/8.0/en/datetime.html

Quote:
The DATE type is used for values with a date part but no time part. MySQL retrieves and displays DATE values in 'YYYY-MM-DD' format. The supported range is '1000-01-01' to '9999-12-31'.
So you would have the publish date as a date field in the db table.

On your recipe add/edit screen you would have the date as an input field on the screen.

On an add the field would be blank and the user would enter or pick the date for publishing. On the edit field, once the record was retrieved you would have the field populated with the current publish date and the user would be able to change it.

.
__________________
All cookies cleared!
sarettah is online now   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote