Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
paulyeo11
Valued Contributor II

SubField([Created Time],'-' ,3) as Year_CD, How to remove the time ?

Hi All


I have below script :-

[Opportunities Created Time] as      [Created Time],


it will display the date and time :-

01-02-2018 08:27:20

01-04-2016 03:03:46

01-04-2016 03:09:00

01-05-2015 01:18:00


May i know how to make it display as below :-

Jan-02-2018

Jan-04-2016

Jan-04-2016

Jan-05-2015


I have try :-

SubField([Created Time],'-' ,3) as Year_CD,

2014 00:36:19

2014 00:43:42

2014 00:50:23

2014 00:50:54


My question is how to remove those time and make it look like below ?

2014

2014

2014

2014


Also may i know how to add the month inform ? So that i it can display as below :-


Jan 2014

Jan 2014

Jan 2014

Jan 2014



Thank you



1 Solution

Accepted Solutions

Re: SubField([Created Time],'-' ,3) as Year_CD, How to remove the time ?

Try this?

Date(Date#([Opportunities Created Time],'MM-DD-YYYY hh:mm:ss'),'MMM-DD-YYYY') as [Created Time]

Life is so rich, and we need to respect to the life !!!
5 Replies

Re: SubField([Created Time],'-' ,3) as Year_CD, How to remove the time ?

Try this?

Date(Date#([Opportunities Created Time],'MM-DD-YYYY hh:mm:ss'),'MMM-DD-YYYY') as [Created Time]

Life is so rich, and we need to respect to the life !!!
paulyeo11
Valued Contributor II

Re: SubField([Created Time],'-' ,3) as Year_CD, How to remove the time ?

Hi Anil

Thank you so much for your help. Now your expression display as below :-

Jul-09-2014

How to make it display as Month Year , like below :-

Jul 2014

Paul

paulyeo11
Valued Contributor II

Re: SubField([Created Time],'-' ,3) as Year_CD, How to remove the time ?

Hi Anil

I notice your script very easy to modify :-

Date(Date#([Opportunities Created Time],'MM-DD-YYYY hh:mm:ss'),'MMM-YYYY') as [Created Time_1],

Thank

Paul   

Re: SubField([Created Time],'-' ,3) as Year_CD, How to remove the time ?

Even MonthName() should work here

=MonthName(Date#([Opportunities Created Time],'MM-DD-YYYY hh:mm:ss'))

Life is so rich, and we need to respect to the life !!!
paulyeo11
Valued Contributor II

Re: SubField([Created Time],'-' ,3) as Year_CD, How to remove the time ?

Hi Anil

This is the best i see far .

very flexible.

Thank

Paul

Community Browser