Qlik Community

Qlik Sense App Development

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

monikamreddy
New Contributor III

Alternative for WeekEnd function ?

Hi All

I am using a WeekEnd function in my load script to get a master calender at week level and the result I am getting is the date converted with respective weekend dates with the time stamp. I want the output without the time-stamp. I have tried converting the output format by using date and left function but they dont seem to work.

All the three examples below :

1. Weekend(Date_Example,0,5)

2. Date(floor(Weekend(Date_Example,0,5)),'MM/DD/YYYY')

3. Left(Weekend(Date_Example,0,5),10)


give same output as '12/2/2016  12:00:00 AM' (with the time stamp) when viewed in excel


is there an alternative for this in qlikview


Thanks,

Monika

10 Replies
MVP
MVP

Re: Alternative for WeekEnd function ?

Which object are you exporting this from?

monikamreddy
New Contributor III

Re: Alternative for WeekEnd function ?

Default table in Qlik Sense.

MVP
MVP

Re: Alternative for WeekEnd function ?

I thought you were using QlikView because all your tags mentioned QlikView

Capture.PNG

Not sure why it exports with the time portion, but may be add date as Date(WeekEnd, 'MM/DD/YYYY') in your table.

monikamreddy
New Contributor III

Re: Alternative for WeekEnd function ?

My thought process was back end load scripts for qlikview and qliksense are essentially the same.

At least it works for my version of Qlik Sense.

Still gives the same output with time stamp

MVP
MVP

Re: Alternative for WeekEnd function ?

Do you have another date field which doesn't have the same problem? I guess what I am getting at is that may be this more an issue of how the export works and how Excel handles it versus how you define it in the script/

monikamreddy
New Contributor III

Re: Alternative for WeekEnd function ?

yes the normal week end dates in the raw data file, they are exported without the time stamp. But excel is showing the WeekEnd dates with time stamp. Also when I join on these weeks my metric values are zero. Since the format of these two weeks are different

MVP
MVP

Re: Alternative for WeekEnd function ?

Join in the script? Join in the script don't look at the format... as long as the underlying numeric value is the same... just to confirm, you are using this, right?

Date(floor(Weekend(Date_Example,0,5)),'MM/DD/YYYY')

monikamreddy
New Contributor III

Re: Alternative for WeekEnd function ?

Yes

MVP
MVP

Re: Alternative for WeekEnd function ?

Then I don't see why script joins would cause an issue... can you share a sample?