Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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
sunny_talwar

Which object are you exporting this from?

Anonymous
Not applicable
Author

Default table in Qlik Sense.

sunny_talwar

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.

Anonymous
Not applicable
Author

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

sunny_talwar

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/

Anonymous
Not applicable
Author

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

sunny_talwar

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')

Anonymous
Not applicable
Author

Yes

sunny_talwar

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