Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am using Qlik Sense as a SaaS and trying to create a PixelPerfect Report online (not via Excel Plugin).
But I am struggeling to get LocalDateTimeNow() to display the local date of the user.
My User Profile shows that I am CET plus 1, but the LocalDateTimeNow() always returns CET (Standard time in this case as it is the same).
If this is not working like that, then what does LocalDateTimeNow() actually mean compared to now() ?
GB
Hi,
Now() returns the Timestamp regarding the System settings.
LocalTime() returns the Timestamp for a specific region, which is a parameter of the function.
Does the Now() function in Qlik Sense (not the Pixel Perfect report) return the correct time (CET+1) or not ?
Best
HI,
Now() in Sense does not show CET+1.
Can you suggest here?
Thanks in advance...
Hi,
Date and Time funciotn of Qlik Sense Cloud are documented in the help site page https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/Scripting/DateAndTimeFun... and I'm not able to find LocalDateTimeNow(). You can use now() to retrieve the timestamp of the Qlik Sense server or use LocalTime() https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/Scripting/DateAndTimeFun... that allows you to specify the time zone.
To get the format you want I suggest to use Qlik Sense formatting functions. For example FormatString('{0:dd/MM/yyyy}', AddDays(#1899-12-30#, [Date]))
In case you do not use section access, only one report will be created for every group of filters so there could be users in different time zones receiving the same report.
Best Regards,
Ruggero
Hi,
see screenshot below about LocalDateTimeNow(). It is a standard function.
It seems to me that there are quite fundamental differences between the "normal" expression editor, and the one in the PixelPerfect area.
But perhaps lets forget about the way I wanted to do it. What I need to achieve is that the report created shows our CET plus 1 time. How do I do that? And Bonus Question: Not in the expression editor in the sheets, but in the expression editor in Pixel Perfect.
I see where you are going.
I am able to get 12 am Feb. 6, 2025 every time with LocalDateTimeToday() within function editor for for the label shown below. So this function LocalDateTimeToday() doesn't seem to work.
However, UTCNow() works as shown below but cannot do -8 to set to local PST. It goes blank when inserting -8 ie: UTCNow()-8 or UTCNow(()-8)
Now() doesnt work at all.
I suspect the feature is not available so not working as hoped.
Please submit the requirement here in our ideation feature request site.
In the meantime you can use Ruggero's suggestion.
Here is an example of one I use in Qlik Sense Cloud.
Add a text or image and text box or chart object to your Qlik App and use this in the formula editor. (name the object so you will recognized from the PxP editor.
ConvertToLocalTime(UTC(), 'GMT-08:00')'
*Keep in mind that the above is PST. Adjust it accordingly.
Use the 'add image' feature to add the new object to your PxP report
As you can see below, the result is as expected. Local time 1:20 pm PST (top right of the report output.
Hi,
1 - Create a variable in Qlik Sense app called, for example, vUserTimeZone and set the default value to 0
2 - Create filters in reporting to set the value of the variable. For example UTZ 10 to add 10 hours to the server time zone to calculate the one of the user. I suppose the server is set to UTC. It is possible to use filters to set the value of variables.
3 - Assign the correct filter to each recipient in the Excel file you use to import them
4 - Create a PixelPerfect template and add an expressio with the formula =Text(Timestamp(Timestamp('1899-12-30') + (Now(1) + vUserTimeZone/24), 'DD/MM/YYYY HH:mm')) The now(1) returns the server date and time and it adds the variable value vUserTimeZone/24 divided by 24 to calculate the hours. The formula applies also the formatting rules that you prefer.
5 - Insert the formula in the template, create a task and distribute the reports to the users: each will receive the calculated field customized for the associated value of the variable.
Best Reagrds,
Ruggero