Task: display information about a product that has been sold less than a year ago. Structure fields: seller, product name, price, date of sale. How to store the date?
Closed due to the fact that the issue is too general for the participants jfs , user194374, Vlad , Vlad from Moscow , Harry 6 Feb '17 at 12:32 .
Please correct the question so that it describes the specific problem with sufficient detail to determine the appropriate answer. Do not ask a few questions at once. See “How to ask a good question?” For clarification. If the question can be reformulated according to the rules set out in the certificate , edit it .
|
1 answer
How convenient for processing.
I would consider both options as a number YYYYMMDD or a Julian day .
|
Как правильно хранить дату?- in the form of a timestamp . The time stamp is resistant to transitions between summer / winter time and time zones. - ߊߚߤߘYYYYMMDDHHIISS, for example. With any of these incidents are possible, you always need to understand how to cook. - vp_arth