Questions

SQL Date format for credit card

+
0 Votes
Locked

SQL Date format for credit card

gavinjinks
Hi There, I am very new to MySQL and am creating a database for online payments etc. What datatype do I need to use for the credit card expiry date?

If i put in the DATE/TIME syntax then it comes up DDMMYYYY. I need to end up having MM/YY only and validated.

Could any one help me please?

Thanks in advance.
+
0 Votes
Tony Hopkinson

As far as I know at least in the UK it's the last day of the month.
Store it as that, then display as MM/YY with a format command.
Data entry your options will depends on what you use, a standard calendar control and then just force the selection to the end of the month is one way.
Spinedit, drop down list, edit box and then check for 1 - 12 etc...

Storing it as something other than a date would simply move the messing about particular when checking to see if the card had expired, don't see much use in that.

+
0 Votes
IT.vgomez

if it's a personal business account either is yours or a company you want to provide CC options too. first is what type of OS are you using. is your a application PCI complaint and can you provide a personal level security that any other pci complaint software or hareware is going to be willing to take the risk.

+
0 Votes
gavinjinks

It's an example I'm nocking up for a University assignment,although the idea is to take our database into the next semester and possibly use it online then.

+
0 Votes
brian

when the cx puts the card mm/yy in split it on the / and add dd/ setting dd to 01 to satisfy the field. When pulling it out, you will have a mm/dd/yy format, split it on the / and then put in the corrosponding mm/yy variables and add a / inbetween (not the best way to do it, but...what ever works sometimes lol).