Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

QlikWorld 2020: Join us May 11 - 14, 2020 in Phoenix, AZ. Register early and save $400. Learn More
New Contributor

Convert to Date

I have "Completion Date" field  which looks like this

7/17/2019 09:06 AM America/New York

I managed to separate date from the text but cannot convert date into date datatype.

Can someone help?

PS - Sorry for the format. Somehow it doesn't allow me to post as is.

Labels (1)
4 Replies
Contributor III

Re: Convert to Date

text to date can be achieved  by date#

date#(textfield, 'format in which text stores date for ex 12/01/2019 could be dd/mm/yyyy')


Re: Convert to Date

@yashkoradia Could you please share an sample on how your Completion Date  could look like

I think you left that part out in your original post.

Plees ekskuse my Swenglish and or Norweglish spelling misstakes

Re: Convert to Date


probably this could work:

Subfield(data,' ',1) & ' ' & Subfield(data, ' ',2) & ' ' & Subfield(data, ' ',3)  ---> 7/17/2019 09:06 AM

Subfield(data,' ',1) & ' ' & Subfield(data, ' ',2)  ---> 7/17/2019 09:06

Subfield(data,' ',1) ---> 7/17/2019

Contributor III

Re: Convert to Date

on top of what @StarinieriG suggested , my guess is you will have to add date# if you want field of date type

something like this


date#(Subfield(data,' ',1) ,'mm/dd/yyyy') , this will generare date number, add this to format it as date


date(date#(Subfield(data,' ',1) ,'mm/dd/yyyy') ,mm/dd/yyyy')