Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
QlikWorld, June 24-25, 2020. Free virtual event for Data Integration and Data Analytics gurus. Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Partner
Partner

date format & timestamp format

I've got a date column that displays it as -- '2019-07-31 00:00:00.000000'

I'd like to do some manipulation in qlik and also have it very simple to show it in a format such as 'MM/DD/YYYY'

I've tried to do a few manipulation hoping to produce it in that format but ends up being null. 

Syntax that has been tried:

1. Date(Date#([marketingDate], 'MM/DD/YYYY') ) AS [Marketing Date]

2. Timestamp(Timestamp#([marketingDate], 'YYYY/MM/DD hh:mm:ss') ,'MM/DD/YYYY') AS [Marketing ]

Still ends up showing either wrong or empty.

 

Labels (3)
2 Solutions

Accepted Solutions
Highlighted
Partner
Partner

Re: date format & timestamp format

Solution:

Date([YOURFIELDDATE], 'MM-DD-YYYY') as [DATE]

View solution in original post

Highlighted
Master II
Master II

Re: date format & timestamp format

Maybe this:

 

if([marketingDate] - [financeDate] < 30, green(),
if(([marketingDate] - [financeDate]) > 30 and [marketingDate] - [financeDate]) < 90, lightred())

View solution in original post

6 Replies
Highlighted
Master II
Master II

Re: date format & timestamp format

try this:

date(date#(left([marketingDate],10),'YYYY-MM-DD'),'MM/DD/YYYY') AS [Marketing Date]
Highlighted
Partner
Partner

Re: date format & timestamp format

Does not work. Any other suggestions? Feel like this is something that should be a simple fix.

Highlighted
Partner
Partner

Re: date format & timestamp format

Solution:

Date([YOURFIELDDATE], 'MM-DD-YYYY') as [DATE]

View solution in original post

Highlighted
Partner
Partner

Re: date format & timestamp format

Hey Frank thanks for your help. Wondering if you can help me out with my syntax.

I am coloring cells depending on what different in days.

if(
[marketingDate] - [financeDate] < 30, green(),
if(([marketingDate] - [financeDate]) > 30 and < 90, lightred())

My syntax is wrong and wondering how to set up the in between factor when running an if statement in qlik.

Thanks.

Highlighted
Master II
Master II

Re: date format & timestamp format

Maybe this:

 

if([marketingDate] - [financeDate] < 30, green(),
if(([marketingDate] - [financeDate]) > 30 and [marketingDate] - [financeDate]) < 90, lightred())

View solution in original post

Highlighted
Partner
Partner

Re: date format & timestamp format

Thanks Frank. Works like a charm.