How do I display a credit card number as 0507 from a seperate mon.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am attempting to combine a 2 digit month (ex. 05) with a 4 digit year (ex.
2007). I need it to be a single 4 digit number (ex. 0507).

thanks.
 
Joel

If you'll never do math on it, it isn't a number. It's text, with digit
characters. Take a look at concatenation and at the Right() function.
 
On Tue, 12 Oct 2004 22:49:09 -0700, Joel B <Joel
I am attempting to combine a 2 digit month (ex. 05) with a 4 digit year (ex.
2007). I need it to be a single 4 digit number (ex. 0507).

thanks.

Use a Text datatype, not a Number; and fill it using

Format([monthno], "00") & Format([yearno] MOD 100, "00")

John W. Vinson[MVP]
Join the online Access Chats
Tuesday 11am EDT - Thursday 3:30pm EDT
http://community.compuserve.com/msdevapps
 
Back
Top