mirror of
https://github.com/nxshock/mssqlbulkloader.git
synced 2025-07-01 00:03:36 +05:00
Remove spaces before parsing float types
This commit is contained in:
parent
ab95f49c96
commit
81729ffcd0
1 changed files with 3 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue