Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
CHVR
New Contributor III

SQL CURRENT_TIMESTAMP in QlikView

Hello Qlik Geeks,

 

I have a SQL query ''DateFrom <= CURRENT_TIMESTAMP and DateTo > =CURRENT_TIMESTAMP'' and trying to apply this query in Qlik Extractor to pull the data from SQL and store into QVD. May I know what is the exact function I should replace  CURRENT_TIMESTAMP in Qlik?

 

Thanks,

Reddy

3 Replies
Partner
Partner

Re: SQL CURRENT_TIMESTAMP in QlikView

Use today () for date only or now() fot date and time.
You may need to format it according to your db field.

Alternatively you can use native current time/date function from db too
CHVR
New Contributor III

Re: SQL CURRENT_TIMESTAMP in QlikView

My DB date format is --'2000-01-01'
Partner
Partner

Re: SQL CURRENT_TIMESTAMP in QlikView

Then put into a variable
Date (today (), 'YYYY-MM-DD')
Usr variable within your SQL statement something like below
Date>'$(yourvariable)'