Skip to main content
Announcements
Defect acknowledgement with Nprinting Engine May 2022 SR2, please READ HERE
cancel
Showing results for 
Search instead for 
Did you mean: 
nicalbert
Partner - Contributor III
Partner - Contributor III

Timestamp formatting in nPrinting

Hello all,

I have problems showing a timestamp properly in an nPrinting table. As an example, the QV document to which the table is linked shows 4/19/2018 10:31:48 AM (which is what needs to be displayed and how the timestamp is formatted in the QV doc). In nPrinting:

  • I've tried leaving the Format String property blank, it returns 43209.43875 (which fits date and time, but in the wrong format)
  • I've tried setting the Format string property M/D/YYYY h:mm:ss TT, it literally returns M/D/YYYY h:mm:ss TT (no numbers, just the format string!)

All other numeric fields are properly formatted without having to fine tune anything... Anyone can help?

Thanks!

Nic

1 Solution

Accepted Solutions
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Ok then - it looks like it is still the same issue as here - i remember answering this question already:)

NP 17.3: PixelPerfect and Date Format

so again just a quick reminder to check community first and then post the topic.

Since we are already on this subject - Ruggero ( rpc‌ ) do you think this is a bug? I notice that you can apply formatting properly in a header when data is coming from a table, but when it is a Level used to populate NPrinting PixelPerfect Table values it doen not work.

cheers

Lech

---------------------------------------------

When applicable please mark the appropriate replies as CORRECT. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads as HELPFUL if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads as HELPFUL if you feel additional info is useful to others.

cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.

View solution in original post

9 Replies
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

It would be great to know in which template you tried to apply formatting. Was it pixel perfect, htm, excel...?

What is the source of data? Is it QV straight table?

cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.
Ruggero_Piccoli
Support
Support

Hi,

I agree with Lech. Consider also to post screenshots and any other information that could help people to help you.

Check also this recent community post Date Stamp for Report Run Date in NPrinting maybe you can add a Formula to format (not calculate) your data.

Best Regards,

Ruggero

---------------------------------------------

When applicable please mark the appropriate replies as CORRECT https://community.qlik.com/docs/DOC-14806. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads as HELPFUL if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads as HELPFUL if you feel additional info is useful to others.



Best Regards,
Ruggero
---------------------------------------------
When applicable please mark the appropriate replies as CORRECT. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads with a LIKE if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads with LIKEs if you feel additional info is useful to others.
nicalbert
Partner - Contributor III
Partner - Contributor III
Author

Sorry guys!

Data comes from a QV straight table and I'm using a Pixel Perfect template.

So far, I've been able to display the timestamp properly by tweaking the straight table in QV, setting the expression as =text(timestamp).

Nic

Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Ok then - it looks like it is still the same issue as here - i remember answering this question already:)

NP 17.3: PixelPerfect and Date Format

so again just a quick reminder to check community first and then post the topic.

Since we are already on this subject - Ruggero ( rpc‌ ) do you think this is a bug? I notice that you can apply formatting properly in a header when data is coming from a table, but when it is a Level used to populate NPrinting PixelPerfect Table values it doen not work.

cheers

Lech

---------------------------------------------

When applicable please mark the appropriate replies as CORRECT. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads as HELPFUL if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads as HELPFUL if you feel additional info is useful to others.

cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.
Ruggero_Piccoli
Support
Support

Hi,

I confirm that we are investigating this as a bug. At the moment (April 2018) formatting the dates in QlikView and exporting them as text is a correct workaround.

Best Regards,

Ruggero

---------------------------------------------

When applicable please mark the appropriate replies as CORRECT https://community.qlik.com/docs/DOC-14806. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads as HELPFUL if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads as HELPFUL if you feel additional info is useful to others.



Best Regards,
Ruggero
---------------------------------------------
When applicable please mark the appropriate replies as CORRECT. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads with a LIKE if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads with LIKEs if you feel additional info is useful to others.
xavi_arm12
Contributor
Contributor

Ok,

i have read all the post and solutions (formatting the dates in QlikView and exporting them as text, script in nprinting designer,...).

But then, how can you deal with formatting rules realted with this date fields. For instance:

Iif(GetDate([datefield]) < Today(),True,False)

We are using Nprinting 20 version and still the bug is not fixed....

Ruggero_Piccoli
Support
Support

Hi,

This is a very old post.  I suggest to start a new post for a new question. Please add also some screenshot to let us to better understand what you are doing.

The fields used in formatting rules must be part of the level where you are applying the rule. Then often you need to try and test to develop formatting rules formulas.

I hope this helps.

Ruggero

 

 



Best Regards,
Ruggero
---------------------------------------------
When applicable please mark the appropriate replies as CORRECT. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads with a LIKE if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads with LIKEs if you feel additional info is useful to others.
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

For scenarios like above you often need to bring 2 fields one as text and one as actual value. Then you display text field but use numerical one for conditional formatting

cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.
xavi_arm12
Contributor
Contributor

Thank you for your both replies.

What I just did was to add the table that cointan this date field as a table and as a level as well, like it was in nprinting old versions.

About formatting rules,using the variable name as TABLENAME.DATEFIELDNAME it worked for me.

For instance, i need to paint a cell in red if today is newer than given date field.

BEFORE: Iif(GetDate([LEVELdatefield]) < Today(),True,False)

NEW NP VERSION: Iif(GetDate([TABLENAME.TABLEdatefield]) < Today(),True,False)