Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

In App, Datetime Fields are getting displayed in Number format? What would be fix?

Hi Guys,


In  my applications, I can see when I select a date or Datetime field It is displaying as number but my expectation is It should be in format YYYY-MM-DD hh:mm:ss[.fff] TT as in my Script I have used this format.

SET ThousandSep=',';

SET DecimalSep='.';

SET MoneyThousandSep=',';

SET MoneyDecimalSep='.';

SET MoneyFormat='$#,##0.00;($#,##0.00)';

SET TimeFormat='hh:mm:ss TT';

SET DateFormat='YYYY-MM-DD';

SET TimestampFormat='YYYY-MM-DD hh:mm:ss[.fff] TT';

SET MonthNames='Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec';

SET DayNames='Mon;Tue;Wed;Thu;Fri;Sat;Sun';

SET HidePrefix='%';

There is any simple fix for this?

I know end user is having option to change the format by following these steps:

List Box or Object Properties-->More-->Number-->Override Default Settings-->select you format

Is there any other method so that we can define this at application level during design so that each user should not go and change the format?

1 Solution

Accepted Solutions
Not applicable
Author

Hi Sasi,

Thanks for your quick response.

I am afraid to add any convert function in my Script as it is tedious task and may impact performance.

I discover easy way to do this:

Open the App in Desktop -->Go to Settings--> Document Properties-->Number-->Select the field which you want to Format-->Click on Number Format Settings Options like Date or Time Or TimeStamp-->Define your Format (In My case default is coming as YYYY-MM-DD hh:mm:ss[.fff] TT' )-->Click on Apply.

Reload and Publish

View solution in original post

4 Replies
vardhancse
Specialist III
Specialist III

Hi,

For the fields while loading we can add the functions like:

Date(Floor(Field)) as Date,

Time(Field) as time,

so that as per the given format the data and time will be displayed and not required to format individual objects wise.

jonathandienst
Partner - Champion III
Partner - Champion III

Either format the value on load:

     LOAD ....

          Date(DateField) As Date,

          ....

or format using the Document Properties | Number tab.

If your value is a timestamp, you should split it into date and time fields (if the time is necessary) as suggested above.

But use this expression for time:    Time(Frac(Field)) as Time;

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

Hi Sasi,

Thanks for your quick response.

I am afraid to add any convert function in my Script as it is tedious task and may impact performance.

I discover easy way to do this:

Open the App in Desktop -->Go to Settings--> Document Properties-->Number-->Select the field which you want to Format-->Click on Number Format Settings Options like Date or Time Or TimeStamp-->Define your Format (In My case default is coming as YYYY-MM-DD hh:mm:ss[.fff] TT' )-->Click on Apply.

Reload and Publish

vardhancse
Specialist III
Specialist III

Correct what we are doing in front end is same as conversion in back end while loading itself, in so many cases we will have the date field is a combination of date, time and so we can split the date & time separately.