Tuesday, July 23, 2024
HomeGolangPq: faulty array literal: "2024-04-05 00:00:00Z" - Getting Assist

Pq: faulty array literal: “2024-04-05 00:00:00Z” – Getting Assist


within the postgres database

{"2024-04-05 00:00:00","2024-04-10 00:00:00"}
func qSchBkg(w http.ResponseWriter, conn *sql.DB,begin time.Time,finish time.Time) (rows *sql.Rows, err error) {

    fmt.Println("qSchBkg begin.. ", begin)
    // begin,finish print 2024-04-06 00:00:00 +0000 UTC 2024-04-07 00:00:00 +0000 UTC
    rows,err = conn.Question("SELECT * FROM reserving WHERE days_booking BETWEEN $1 AND $2", begin,finish)

    if err != nil {
        change {
            case true:
            fmt.Fprintf(w, "Error: Question()..! : %+vn", err)
            break
        }
        return
    }
    return rows,err
}

Attempt to working the identical question in a postgress database consumer to see what error is returning the database

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments