Qlik Community

Ask a Question

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Qlik Highlights 2020 Giveaway! Watch, reply and have a chance to win a $200 Amazon Gift Card! Watch Video
cancel
Showing results for 
Search instead for 
Did you mean: 
Specialist II
Specialist 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

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

View solution in original post

2 Replies
MVP & Luminary
MVP & Luminary

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

View solution in original post

Specialist II
Specialist II

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