Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HELP! 3 & 4 Digits in data... need all to be 4 Digits 415 = 0415

Status
Not open for further replies.

christiancorley

Technical User
Jun 14, 2011
3
US
My data has card expiration as 415 and 1213. Need resulting data to have all four digits, so 415 (means April of 2015) to be 0415, but leave 1213 as is since it is four digits.

I can do this in Excel in 5 seconds, but can't figure out in Crystal. HELP!
Tx!
Christian
 
BTW, they are more than likely NOT the same result as in Excel, but the difference may, and I repeat, MAY be irrelevant.

In Excel you probably gave your number column a NUMBER FORMAT that DISPLAYED leading zeros. But if your number were 415 with leading zeros to 4 digits, the underlying value would still be the NUMBER 415. However, the solution given you in CR, actually converts the NUMBER 415 to CHARACTERS 0415, which is an ENTIRELY DIFFERENT VALUE!

now for your report it may be a distinction without a difference. But "caveat emptor!"

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top