Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
chematos
Specialist II
Specialist II

Date format

Hi,

I´m trying this in the load script to create a field Date type, but trying many ways, it always stays like Timestamp.

Date(Floor(MonthEnd(MakeDate(Left(PERIODO,4),Right(PERIODO,2),'01'))))    ---->TimeStamp

MonthEnd(MakeDate(Left(PERIODO,4),Right(PERIODO,2),'01'))  ---->TimeStamp

If I do MonthEnd(MakeDate(Left(PERIODO,4),Right(PERIODO,2),'01')) as EndDate in TABLE1, returns to me a timestamp,

but after that I do Date(Floor(EndDate)) and I get a date field. Why if I apply those functions like my first choice it doesn´t work??

Thnak`s for any help.

Chema.

1 Solution

Accepted Solutions
Jason_Michaelides
Luminary Alumni
Luminary Alumni

Try wrapping in Date# before the Date(), so Date(Date#(blah blah blah),'DD/MM/YYYY')

View solution in original post

3 Replies
Jason_Michaelides
Luminary Alumni
Luminary Alumni

Try wrapping in Date# before the Date(), so Date(Date#(blah blah blah),'DD/MM/YYYY')

chematos
Specialist II
Specialist II
Author

Hi Jason,

Thank you, it´s working. But I have a question about this because I´ve tried to do this with two different fields that I have also in my master calendar.

MasterCalendar: I have a date field that is %Date and a timestamp field that is [Month Year], so if I try the previous sentence and I name that as %Date, then I get a date field, but if I name as [Month Year], I get a timestamp. That´s because of my types of data in my Master Calendar and QlikView force to be that fields the same type ??

Regards

Jason_Michaelides
Luminary Alumni
Luminary Alumni

That would seem likely. If %Date is already defined as a Date field then it would probably make all future additions to that field the same if possible.