Format currency as 8 digit number in query (1 Viewer)

ascaife

Registered User.
Local time
Tomorrow, 07:57
Joined
Nov 10, 2008
Messages
50
Hi all,

Hope this isn't too silly a question.

I have a currency field in my database that needs to be formatted in a specific manner for output to a 3rd party system.

The number needs to include 8 digits with trailing or leading zeroes.

Eg.
$585.00 = 00058500
$585.45 = 00058545

If anyone could help me out that would be awesome.

Thanks,

Andrew
 

Galaxiom

Super Moderator
Staff member
Local time
Tomorrow, 07:57
Joined
Jan 20, 2009
Messages
12,854
Format([fieldname]*100, "00000000")

Note however the result is a string rather than a number.
 

ascaife

Registered User.
Local time
Tomorrow, 07:57
Joined
Nov 10, 2008
Messages
50
Wow that was fast.

Worked a treat, and string is fine as it outputs as text.

Thank you so much
 

Users who are viewing this thread

Top Bottom