VanJava
asked on
Credit Card Expiry Date
What is the best datatype to be used to store expiry date of credit card which only needs input of month and year.
Thanks
Thanks
I would choose date, with 01 as day.
ASKER
Is it ok if I'm using number(4)?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
>Is it ok if I'm using number(4)?
you could do so, but why bother to make it more complicated than needed?...
btw: in oracle, to calculate the last dayof the month is called LAST_DAY().
however, as mentioned, I would still use the first day of the month, and calculate the "real" expiry date with:
SYSDATE < ADD_MONTHS(expiry_date, 1)
you could do so, but why bother to make it more complicated than needed?...
btw: in oracle, to calculate the last dayof the month is called LAST_DAY().
however, as mentioned, I would still use the first day of the month, and calculate the "real" expiry date with:
SYSDATE < ADD_MONTHS(expiry_date, 1)
ASKER
Thank you all