Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
eduardo_dimperi
Valued Contributor II

Help with Timestamp

Hi everyone,

I've problem with timestamp

In this code below if i get only date() doesn't crash, but if i try to use with hh:mm:ss i get an error.

someone could help me?

DATA_ATUALIZACAO:

LOAD

Date(MAX(DATA_E_HORA),'DD/MM/YYYY hh:mm:ss') AS DATAMAX

RESIDENT CARREGA_QVD;

Let vDatamax=FieldValue('DATAMAX',1);

NoConcatenate

CARGA_INCREMENTAL:

LOAD

ID_SYSTEM,

DATE_READ,

ORA_ROWSCN,

PORT,

VALUE_READ,

DATA_E_HORA,

CONCENTRATOR

WHERE DATA_E_HORA>$(vDatamax)

;

SELECT

id_system,

port,

date_read,

value_read,

concentrator,

ora_rowscn,

scn_to_timestamp(ora_rowscn) data_e_hora

from rs_individual_read

where   date_read between TO_DATE(SYSDATE) and TO_DATE(SYSDATE+1);

Erro_timestamp.JPG

1 Solution

Accepted Solutions
MVP & Luminary
MVP & Luminary

Re: Help with Timestamp

Try this:

DATA_ATUALIZACAO:

LOAD

Timestamp(MAX(DATA_E_HORA),'DD/MM/YYYY hh:mm:ss') AS DATAMAX

RESIDENT CARREGA_QVD;

Let vDatamax=FieldValue('DATAMAX',1);

NoConcatenate

CARGA_INCREMENTAL:

LOAD

ID_SYSTEM,

DATE_READ,

ORA_ROWSCN,

PORT,

VALUE_READ,

DATA_E_HORA,

CONCENTRATOR

WHERE DATA_E_HORA > '$(vDatamax)';

- Marcus

2 Replies
MVP & Luminary
MVP & Luminary

Re: Help with Timestamp

Try this:

DATA_ATUALIZACAO:

LOAD

Timestamp(MAX(DATA_E_HORA),'DD/MM/YYYY hh:mm:ss') AS DATAMAX

RESIDENT CARREGA_QVD;

Let vDatamax=FieldValue('DATAMAX',1);

NoConcatenate

CARGA_INCREMENTAL:

LOAD

ID_SYSTEM,

DATE_READ,

ORA_ROWSCN,

PORT,

VALUE_READ,

DATA_E_HORA,

CONCENTRATOR

WHERE DATA_E_HORA > '$(vDatamax)';

- Marcus

eduardo_dimperi
Valued Contributor II

Re: Help with Timestamp

Hi Marcus,

You are right, i didn't know that had need to put between ' ' a variable, I thought that was to get the name of the variable and no the value inside.

Thank you