mirror of
https://github.com/nxshock/mssqlbulkloader.git
synced 2024-11-27 00:11:02 +05:00
Remove spaces before parsing float types
This commit is contained in:
parent
ab95f49c96
commit
81729ffcd0
@ -42,7 +42,9 @@ func (ft FieldType) ParseValue(reader Reader, s string) (any, error) {
|
||||
case Integer:
|
||||
return strconv.ParseInt(s, 10, 64)
|
||||
case Float, Money:
|
||||
return strconv.ParseFloat(strings.ReplaceAll(s, ",", "."), 64)
|
||||
s = strings.ReplaceAll(s, ",", ".")
|
||||
s = strings.ReplaceAll(s, " ", "")
|
||||
return strconv.ParseFloat(s, 64)
|
||||
case Date:
|
||||
if i, ok := reader.(CustomDateParser); ok {
|
||||
t, err := i.ParseDate(s)
|
||||
|
Loading…
Reference in New Issue
Block a user