Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Getting a Date & Time Value from Commandline

Hi all,

I have the following problem and any advise would be welcome.

I am forwarding two variable via batch:

qv.exe /r /vschmat_datum_tmp=%date% /vschmat_zeit_tmp=%time% my.qvw

These variables are shown in an input box of my qvw after execution  of the batch thus transmission is working.

schmat_datum_tmp 28.08.2012

schmat_zeit_tmp 14:48:55,85

In the loadscript I wanted to combine these to variables to a timestamp like this:

let schmat_tmp=timestamp(date($(schmat_datum_tmp)) + time($schmat_zeit_tmp,'hh:mm')) ;

It always runs into an error message during script execution. I thought the time ms might be the cause thus I tried the following:

let schmat_tmp=date($(schmat_datum_tmp));

But this causes the same Error again.

Any idea what is wrong?

Regards,

Schmat

1 Solution

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

You'll need the # versions of the functions to read the values.

let schmat_tmp = timestamp(date#('$(schmat_datum_tmp)') + time#('$(schmat_zeit_tmp)','hh:mm'))

View solution in original post

3 Replies
fosuzuki
Partner - Specialist III
Partner - Specialist III

Maybe if you try:

let schmat_tmp = timestamp(date('$(schmat_datum_tmp)') + time('$(schmat_zeit_tmp)','hh:mm')) ;

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

You'll need the # versions of the functions to read the values.

let schmat_tmp = timestamp(date#('$(schmat_datum_tmp)') + time#('$(schmat_zeit_tmp)','hh:mm'))

Anonymous
Not applicable
Author

Edit:

Its working now:

Using the following Code:

let schmat_tmp = timestamp(date('$(schmat_datum_tmp)')+ time(left('$(schmat_zeit_tmp)',5)));

Thx for your help.