Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

chematos
Valued Contributor 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.

Tags (2)
1 Solution

Accepted Solutions
jason_michaelid
Honored Contributor II

Date format

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

3 Replies
jason_michaelid
Honored Contributor II

Date format

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

chematos
Valued Contributor II

Date format

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_michaelid
Honored Contributor II

Date format

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.

Community Browser