Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
stjernvd
Partner - Creator
Partner - Creator

Dates error in QlikView using SQL Query

Hi,

When I create this table,

Dates:

LOAD
Concat(Chr(39) & date& Chr(39), ', ' ) As date;
SQL SELECT
date
FROM xxx;

Let vChoose = peek('date', 0, 'Dates');

I get the following values:

'42226', '42227', and so on.

I should be getting:

'20/07/2015 00:00:00' in this format.

What am I doing wrong?

 

1 Solution

Accepted Solutions
lironbaram
Partner - Master III
Partner - Master III

you can change the script to

Dates:

LOAD
Concat(Chr(39) & date(dt_bus,'DD/MM/YYYY')& Chr(39), ', ' ) As date;
SQL SELECT
dt_bus
FROM TOOLS_DATA_HIST;

Let vChoose = peek('date', 0, 'Dates');

View solution in original post

3 Replies
lironbaram
Partner - Master III
Partner - Master III

you can change the script to

Dates:

LOAD
Concat(Chr(39) & date(dt_bus,'DD/MM/YYYY')& Chr(39), ', ' ) As date;
SQL SELECT
dt_bus
FROM TOOLS_DATA_HIST;

Let vChoose = peek('date', 0, 'Dates');

stjernvd
Partner - Creator
Partner - Creator
Author

Hi Liron,

Thanks so much for this.

How would I get the date into this format, for example:

10 Sep 2015

?

PrashantSangle

Hi,

use

date(datefiled,'DD MMM YYYY')

  Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂