Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Datetime to just Date

Hello,

I'm very new to QV so please bear with me.

I have a datetime datatype coming in from an SQL table.

In the QV straight table it shows as dd-mm-yyyy; as I've used Date(floor(mydate)dd-mm-yyyy).... etc - So far so good.

When I export that table to excel or when I run my nprint task the date is coming in as a String.

How can I get just the dd-mm-yyyy to show in my export and nprint and have it as a date-type?

As I need to do further date related queries on it in an excel setting.

Thanks.

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

What I ended up doing to get a Date datatype being output was:

 

LOAD ProjectID,
Date((Min (BenefitTargetDate)),'DD/MM/YYYY') as [BTargetDate]
GROUP By ProjectID;

SQL SELECT ProjectID,
BenefitTargetDate
FROM xxx.dbo.ProjectDetails;

View solution in original post

5 Replies
mikaelsc
Specialist
Specialist

where are you doing the formatting? (script or table?) 

also check if "keep source formatting" in nprinting solves your pb. 

Anonymous
Not applicable
Author

Thanks for the reply.

The dashboard I'm working on was not originally created by me.

There is alot of formatting going on in the script.

My current attempt (Date(Floor())) is done on the table.

The remaining conditional formatting is currently done on the nprint template.

I'll have a look for that "keep source formatting" when I'm in the office in the morning.

has75042
Creator
Creator

I had the same issue. 

This is what I did

=Date(CalendarLink, 'MM/DD/YYYY')

=date(Date(CalendarLink)) 

 

It worked for me

Anonymous
Not applicable
Author

Please forgive the basic question as I'm sort of learning on the job here, but...
I would on the Dimension in question in the table?
Anonymous
Not applicable
Author

What I ended up doing to get a Date datatype being output was:

 

LOAD ProjectID,
Date((Min (BenefitTargetDate)),'DD/MM/YYYY') as [BTargetDate]
GROUP By ProjectID;

SQL SELECT ProjectID,
BenefitTargetDate
FROM xxx.dbo.ProjectDetails;