Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Date convertion

Hi,


I have a date format like MM/DD/YYYY,I would like to convert it to YYYY Q   format.

Thanks

14 Replies
senpradip007
Specialist III
Specialist III

Try like:

=Year([Your Field]) & ' Q' & ceil(Month([Your Field])/3)

avinashelite

Hi Rajesh,

Try like this:

Date(Ceil(datefield),'YYYY') &'Q' as newfiled

Not applicable
Author

I am not successed with above script.

ex:

Date:

8/8/2014(MM/DD/YYYY format)---i would like to convert it 2014 Q3??

any sugestions.

thanks

anbu1984
Master III
Master III

=SubField('8/8/2014','/',3) & ' Q' & Ceil(SubField('8/8/2014','/',1)/3)

tresesco
MVP
MVP

=Year(Date#('8/8/2014', 'MM/DD/YYYY'))&' Q'&ceil(Month(Date#('8/8/2014', 'MM/DD/YYYY'))/3)

You can replace the date here with your datefield.

avinashelite

Hi Rajesh,

Try like this:

Date(Ceil(datefield),'YYYY') &'Q' &Ceil(SubField(datefield),'/',1)/3) as newfiled

this should work

Not applicable
Author

i didi not get expected output ,i got some thing like Q13953

 

Date(Ceil([Bookings Date (2)],'YYYY')) &'Q' &Ceil(SubField([Bookings Date (2)],'/',1)/3) as [Booking Quarter],

Thanks

PrashantSangle

Hi,

Try this,

=Year(Date(DateField, 'MM/DD/YYYY'))&'  Q'&ceil(Month(Date(DateField, 'MM/DD/YYYY'))/3)

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 🙂
avinashelite

Hi,

try like this:

Date(Ceil([Bookings Date (2)],'YYYY')) &'Q' & Date(Ceil([Bookings Date (2)]),'MM')/3 as [Booking Quarter]