Data Type to represent a year/month value

Started by Jean-Christian Imbeaultover 23 years ago2 messagesgeneral
Jump to latest
#1Jean-Christian Imbeault
jc@mega-bucks.co.jp

What would be the best data type to use to represent values of the kind
year/month? I.e. 2002/10, 2003/01

There doesn't seem to be a Date format that I can use. If possible I'd
like to use a built-in data type that would allow for comparisons and
maybe even arithmetic.

Jc

#2Stephane Bortzmeyer
bortzmeyer@nic.fr
In reply to: Jean-Christian Imbeault (#1)
Re: Data Type to represent a year/month value

On Thu, Aug 29, 2002 at 08:25:11PM +0900,
Jean-Christian Imbeault <jc@mega-bucks.co.jp> wrote
a message of 14 lines which said:

What would be the best data type to use to represent values of the kind
year/month? I.e. 2002/10, 2003/01

I would use a regular time stamp with a convention to set the day and
the time to zero (may be with a trigger to ensure that the convention
is respected).