Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.dotnet.framework,microsoft.public.excel.programming
|
|||
|
|||
![]()
Does anyone know how to initialize a NumberFormatInfo instance with a custom
numeric format string? So instead of directly using the custom numeric format string double dVal = 19.95; string strVal = dVal .ToString("$#,##0.00"); // - strVal is $19.95 I would like to first initialize the NumberFormatInfo instance: NumberFormatInfo mobjNumFormat = NumberFormatInfo.CurrentInfo.Clone(); mobjNumFormat.InitWithCustomFormat("$#,##0.00"); string strVal = dVal.ToString("C",mobjNumFormat)) Cheers, Ralf -- Dipl.-Ing. Ralf Steinstraesser Software Architekt Bissantz & Company GmbH |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
find and replace numeric strings in larger text strings | Excel Worksheet Functions | |||
CSV and Numeric Strings with Leading Zeros | Excel Worksheet Functions | |||
Can I convert numeric 0510 to time 05:10 by custom cell format? | Excel Discussion (Misc queries) | |||
How do I compare two arrays of numeric strings? | Excel Programming | |||
Converting variable text strings to numeric | Excel Discussion (Misc queries) |