By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,477 Members | 1,454 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,477 IT Pros & Developers. It's quick & easy.

Formatting Issue

P: n/a
Hi:

I have, I hope, a trivial formatting issue.

I have a field that I wish to format as 12.30 (00.00). IN other words two digits decimal
point and two digits. Using the format command (in a query), I run into a snag:

When I set up the command as:
Format([SumOfW6TotHrs],"nn.nn")

It changes to : Format([SumOfW6TotHrs],"nn\.nn")

And the end result is that the output field always contains zeros.

I know I am doing something wrong, but don't know what it is.

Help appreciated.

John Baker
Nov 13 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Try:
Format([SumOfW6TotHrs],"00.00")

BTW, Format() outputs a string value, so that is not suitable for performing
further math on reliably.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"John Baker" <jo********@comcast.net> wrote in message
news:3r********************************@4ax.com...

I have, I hope, a trivial formatting issue.

I have a field that I wish to format as 12.30 (00.00). IN other words two
digits decimal
point and two digits. Using the format command (in a query), I run into a
snag:

When I set up the command as:
Format([SumOfW6TotHrs],"nn.nn")

It changes to : Format([SumOfW6TotHrs],"nn\.nn")

And the end result is that the output field always contains zeros.

I know I am doing something wrong, but don't know what it is.

Help appreciated.

John Baker

Nov 13 '05 #2

P: n/a
Thank you. Just what I was after. For some reason I believed that n was the term for
numbers, but I guess I was wrong.

Thanks again

John Baker

"Allen Browne" <Al*********@SeeSig.Invalid> wrote:
Try:
Format([SumOfW6TotHrs],"00.00")

BTW, Format() outputs a string value, so that is not suitable for performing
further math on reliably.


Nov 13 '05 #3

P: n/a
Yes, n is for miNutes (because m is for Months.)

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"John Baker" <jo********@comcast.net> wrote in message
news:st********************************@4ax.com...
Thank you. Just what I was after. For some reason I believed that n was
the term for
numbers, but I guess I was wrong.

Thanks again

John Baker

"Allen Browne" <Al*********@SeeSig.Invalid> wrote:
Try:
Format([SumOfW6TotHrs],"00.00")

BTW, Format() outputs a string value, so that is not suitable for
performing
further math on reliably.

Nov 13 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.