Click here to Skip to main content
15,891,431 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
money format like--- 1,00,000

date like : 31.05.2012
oct 2,2012,
05/31/2012
Posted
Comments
Kenneth Haugland 30-Jul-12 7:00am    
Yes please, that sounds nice :)
_Amy 30-Jul-12 7:04am    
What is your question?

 
Share this answer
 
Format with Currency format string:
C#
=Format(Fields!Price.Value, "C")

It will give you 2 decimal places with "$" prefixed.

compared to FormatDateTime Good old 'Format' function makes the job a lot easier :
C#
Format(Fields!ResultDate.Value,"M/d/yyyy")
Format(Fields!ResultDate.Value,"yyyy")



--Amit
 
Share this answer
 
Comments
oliver grace 30-Jul-12 7:21am    
Execellent...got the answer.Thank you
_Amy 30-Jul-12 7:27am    
Thank you Oliver.. :)
oliver grace 30-Jul-12 7:34am    
one issue date M/d/yyyy like this coming i cannot see my date
oliver grace 30-Jul-12 7:40am    
how to avoid $ symbol
_Amy 30-Jul-12 7:44am    
Two workarounds
A)
1. Kill the FormatCurrency Wrapper function in your expression.
2. Use the Format Property of the texbox instead..so Format might equal C2 (for currency with 2 decimal places of precision.
3. Set your Language to English (United Kingdom) - found in Properties, in the International group


B)
If you simply MUST have the FormatCurrency wrapper then do the following
1. Wrap that expression in a CDBL()...so CDBL(FormatCurrency(blah))
2. Follow 2 & 3 in the steps for option A

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900