Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
anuradhaa
Partner - Creator II
Partner - Creator II

Load Sysdate in Qlikview script

Hi,

I want to use sysdate in my qlikview script.

please help me to do that.

Thanks

1 Solution

Accepted Solutions
er_mohit
Master II
Master II

What you want exactly m confused a bit in above statement

1. If you want sysdate when DTM is null then, try this

If(ISnull(DTM),Date(Today(),'DD-MM-YYYY'),DTM) as Date

Note : please mention above date format as alike your DTM field.

2. If you want sysdate when DTM is greater than 0 as you told earlier in example then, try this

If(DTM>0,Date(Today(),'DD-MM-YYYY'),DTM) as Date

Hope it helps

View solution in original post

6 Replies
anbu1984
Master III
Master III

You can use QV function Today() in script

Or

Sql Load sysdate from dual;

prieper
Master II
Master II

NOW() might fit better, as it returned the time as well:

now([ timer_mode])

Returns a timestamp of the current time from the system clock. The timer_mode may have the following values:

0 Time at previously finished reload (not currently ongoing reload)
1 Time at function call
2 Time when the document was opened  

HTH Peter

er_mohit
Master II
Master II

Hi

Try this in text object

=Date(Today())

Regards

Mohit

anuradhaa
Partner - Creator II
Partner - Creator II
Author

Hi,

I want to use sysdate in data loading. and i have if statement inside the script with other dates.

ex -  if(DTM > 0 ,sysdate,DTM) As Date to set DTM=sysdate when date is null

anbu1984
Master III
Master III

If(Len(Trim(DTM)) = 0, Today(), DTM)

er_mohit
Master II
Master II

What you want exactly m confused a bit in above statement

1. If you want sysdate when DTM is null then, try this

If(ISnull(DTM),Date(Today(),'DD-MM-YYYY'),DTM) as Date

Note : please mention above date format as alike your DTM field.

2. If you want sysdate when DTM is greater than 0 as you told earlier in example then, try this

If(DTM>0,Date(Today(),'DD-MM-YYYY'),DTM) as Date

Hope it helps