Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
TalendBasketball65
Contributor
Contributor

Day of the week convert into date (range)

Hello,

How would I convert the day of the week from a spreadsheet to a date? Example user has "Monday" as Start Date and "Thursday" as End Date. I want to convert those to dates.

Thank you ​

Labels (2)
3 Replies
Anonymous
Not applicable

You'll need to give a bit more information for this I am afraid. To get a date you will need the year, the month and even with that, just giving the named days of the week can't help you accurately determine the date.

TalendBasketball65
Contributor
Contributor
Author

0695b00000aD2mRAAS.pngThe process would run let's say on Friday (Dec 2nd) and would reference Thursday(Dec 1st) to the previous Monday (Nov 28th). I'm trying to figure out a way to even code it to the point where it can go back.

Anonymous
Not applicable

This is going to require some Java to figure this out. If you know the date of the file and the rules behind the days in the week mentioned in relation to the date of the file, then it is simply a process of calculating the difference between the day of file (Friday) and each day referenced in the file. If you know the difference between the days, then it is just a case of taking the date of the file and subtracting days from that date. You can use the ....

 

routines.TalendDate.addDate

 

....method for the addition/subtraction.