Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Not applicable

Syntax of date functions... ?

I'm trying to use date format reading data from ms access db.

I Always has errors but not so clear.

The problem is on date function but it seems that field are correct.

Is there syntax mistakes ?

LOAD "Id_Off",





//     date("Data_Off", 'DD-MM-YYYY') As "Data_Off",

    Month("Data_Off") As "Mese_Off",

    Year("Data_Off") As "Anno_Off",

    Day("Data_Off") As "Giorno_Off",

I'm used to put '_' (underscore) within field names but it seems that QS continue to read them as it was a " " blank space adding "    " around the name of field .

Is it better to use [name_field] as in ms access ??

6 Replies

Re: Syntax of date functions... ?

Are you getting error while reloading data or are you just not seeing Month, Year, Day getting calculated?

Not applicable

Re: Syntax of date functions... ?

If I comment that three field I don't have any error....

This is the error but it's very cryptic...


ODBC read failed: SQL SELECT "Id_Off", "Tipo_Off", "Anno_Off", "Nr_Off", "Data_Off", "Id_anag_cli_Off", "Rag_Soc_Off", "TotImp_Off", "TotNI_Off", "TotIva_Off", "Totdoc_Off", "Totriga_Off", "CodDiv_Off", "Codart_Off", "Descr_art_Off", "Qta_Off", "Prezzo_Off", "Cod_iva_Off", "Qta_evasa_Off", "Saldato_Off", Codcat, "A_saldo_Off" FROM "D:\EOS\CONTROLLO_GESTIONE\QUERY_DINAMICO"."CG_OFFERTE_CLIENTI"

Honored Contributor III

Re: Syntax of date functions... ?


LOAD Id_Off,





   date(Data_Off, 'DD-MM-YYYY') As Data_Off,

    Month(Data_Off) As Mese_Off,

    Year(Data_Off) As Anno_Off,

    Day(Data_Off) As Giorno_Off

Re: Syntax of date functions... ?

Why is there a path name in your MS-Access table specification?

In addition to that, you seem to experience two problems at the same time: one in the ODBC read, and one in the LOAD as you mentioned in the original post?

Not applicable

Re: Syntax of date functions... ?

you get an error if you run it

you cant define 2 fields in the same name



   date(Data_Off, 'DD-MM-YYYY') As Data_Off,


Not applicable

Re: Syntax of date functions... ?

Yes , the problem was that but error was really not helpful.

I discover it under ms access trying to simulate the same data query.