Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
azlan1006
Starting Member
2 Posts |
Posted - 2008-07-07 : 21:59:06
|
| The program is here...Dim sLine As String = CType(obj, String)Dim arrLine() As String = sLine.Split(",")Dim custOrderNo As StringDim price as StringdrHd = m_ods.OrderHd.NewOrderHdRowdrHd.CustOrderNo = arrLine(0)drHd.price = arrLine(1)m_ods.OrderHd.Rows.Add(drHd)So the question is if the user insert input of price drHd.price like this $723,51 instead of $723.51, what method that i can use? |
|
|
Bustaz Kool
Master Smack Fu Yak Hacker
1834 Posts |
Posted - 2008-07-08 : 19:13:44
|
| REPLACE(drHd, ',', '.')Convert the comma to a decimal point. You may want to add some logic to not convert comma that are being used as group separators (e.g. $1,234,567.89)=======================================Some people walk in the rain, others just get wet. -Roger Miller, musician (1936-1992) |
 |
|
|
azlan1006
Starting Member
2 Posts |
Posted - 2008-07-09 : 21:30:29
|
| Ok Thanks you Mr Bustaz Kool.... I am really appreciate it!!!Have a nice day!! |
 |
|
|
|
|
|