Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Date field formatting

Hi,

Is there a way to align all the records in this date field to the left.

1 Solution

Accepted Solutions
Miguel_Angel_Baeyens

Hi,

One solution is as Sivaraj suggests above. However, if QlikView detects a number as a date, it aligns to the right (according to its numeric value). If it understands the value as a string instead, then it will be aligned to the left, by default. If you operate those dates, it's likely you will not get correct results, as you have both numeric and literal values.

The best way to do it is to change the LOAD statement in your script and set all date fields to have the same format, using the Date() and Date#() functions.

Hope that makes sense.

Miguel

View solution in original post

7 Replies
sivarajs
Specialist II
Specialist II

Goto chart properties--> Presentation tab --> Change Alignment Numbers to left

whiteline
Master II
Master II

Hi.

It seems that your  [Expiry date] field contains number and string values.

By default strings are aligned to the left while numbers to the right.

I suggest to deside witch type of values you  need and convert them correspondingly, instead of just changing the view alignment.

Miguel_Angel_Baeyens

Hi,

One solution is as Sivaraj suggests above. However, if QlikView detects a number as a date, it aligns to the right (according to its numeric value). If it understands the value as a string instead, then it will be aligned to the left, by default. If you operate those dates, it's likely you will not get correct results, as you have both numeric and literal values.

The best way to do it is to change the LOAD statement in your script and set all date fields to have the same format, using the Date() and Date#() functions.

Hope that makes sense.

Miguel

Anonymous
Not applicable
Author

Hi guys,

@Sivaraj Seeman I just tried that and that didn't work also

Miguel_Angel_Baeyens

Hi,

Sure there is a way to pull data in the correct way, but not knowing how the values are in the source, it's difficult to set an example. Using either Date() or Date#() will do, as it does in most cases. Anyway, post a couple of sample lines here so we can help further.

Miguel

Anonymous
Not applicable
Author

Hi Miguel Angel Baeyens

I didnt change the field name in the chart all along, it's now aligned to the right as date format

Thanks so much

whiteline
Master II
Master II

Hi.

It's strange that you have both numbers and strings. It seems that you LOAD  this field into more than one table. So in one case you've converted them properly unlike the others.

From the other hand the source contains dates in different formats and you didn't use alt() function to handle all of them.

You could post all LOAD statements where [Expiry date] is contained.

And an example of your source data would also be helpful.