mirror of
https://github.com/nxshock/mssqlbulkloader.git
synced 2024-11-28 00:21:03 +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:
|
case Integer:
|
||||||
return strconv.ParseInt(s, 10, 64)
|
return strconv.ParseInt(s, 10, 64)
|
||||||
case Float, Money:
|
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:
|
case Date:
|
||||||
if i, ok := reader.(CustomDateParser); ok {
|
if i, ok := reader.(CustomDateParser); ok {
|
||||||
t, err := i.ParseDate(s)
|
t, err := i.ParseDate(s)
|
||||||
|
Loading…
Reference in New Issue
Block a user