DVD Register Forum

For the elite home video enthusiast

You are not logged in.

#1 2013-09-04 00:37:13

admin
Administrator
Registered: 2013-08-22
Posts: 10

How Should Dates Be Entered?

I have noticed that the date of purchase information contained on the Disc Details Form indicates that the date should be entered as "mm/dd/yy".
I have entered my dates in this manner. I believe in the past I entered the dates with the full four numbers of the year. I have become concerned a bit about one issue - hence my question
Question:
With regard to the Statistics area where you report on the year of purchases of the collection - does it make a difference if only two digits are used when entering the date of purchase information. In other words, does your program recognize "12" to be "2012" for this purpose?


Tom Orlofsky

Offline

#2 2013-09-04 00:52:42

admin
Administrator
Registered: 2013-08-22
Posts: 10

Re: How Should Dates Be Entered?

The Date Purchased and Date Issued fields in the Discs Table are stored internal to the db in the format YYYY-MM-DD 00:00:00  e.g. 1998-01-23 00:00:00. This is the standard format for a mysql timestamp.  mysql is designed to process date/time in this format.

The recommended format to enter a date of mm/dd/yy will always work.  However you can also use mm/dd/YYYY. For example to enter 1898 (or 1798) you would need to enter the full year.  There may be other date formats that work as well. If the date is no good, then null will be saved in the date field. If the date is no good there will not be an error message.

The user statistics report uses the full year because that is what is actually saved in the db. It does not matter if the year is entered on the update screen with two digits or four for recent dates.


Tom Orlofsky

Offline

Board footer

Powered by FluxBB