Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
QlikView_99
Contributor III
Contributor III

Date Functions.

Hi All,

I need to get date(DD/MM/YYYY) for my dataset from the given parameters like day, month, year, week.

The Parameters I have are:

Day: Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday.

Month: January, February, March, April, May, Etc..

Year: 2017, 2018, 2019

Week: Week1, Week2, Week3, Week4.

 

We can use the MakeDate(Year, Month(Date#(Month, 'MMM')), Day) as Date function but we can give only integers in Day function but not the Monday, Tuesday, Etc...

 

So could anyone please suggest me a way to get the dates.

2 Solutions

Accepted Solutions
Taoufiq_Zarra

Hi,

first in the script I added a mapping like this:

datt.PNG

then after loading we get if I apply the function : "=makeweekdate(Year,Keepchar(Week, '0123456789'),NumDay)"

datt.PNG

 

you can also use it in script.

 

Cheers,

Taoufiq

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉

View solution in original post

QlikView_99
Contributor III
Contributor III
Author

Thanks for your support and I got the way to solve it.

we can left join a inline table with Day and Num then we can get the Date. 

left join(student_Table)

load * Inline

[Day,Num

Monday,0

.

.

Etc...];

 

Calc:

Load *,

Makedate(Year,Month,Num) as Date

Resident student_table;

View solution in original post

7 Replies
Taoufiq_Zarra

Hi,

first in the script I added a mapping like this:

datt.PNG

then after loading we get if I apply the function : "=makeweekdate(Year,Keepchar(Week, '0123456789'),NumDay)"

datt.PNG

 

you can also use it in script.

 

Cheers,

Taoufiq

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉
QlikView_99
Contributor III
Contributor III
Author

Appreciate your reply on it and its working fine but in order to get the dates for the whole data we need to pass many hard coded things to the Inline statements in Test table is there any way where we can give the years, months, weeks dynamically?

Taoufiq_Zarra

awesome
can you send an example , I can't really understand the problem very well

 

Cheers

Taoufiq

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉
QlikView_99
Contributor III
Contributor III
Author

Hello,

Here is the dataset I'm working and I need to come to a calculation where, how come the students performing in the daily tests conducted.

In my dataset Day is Monday, Tuesday,....Etc...

Month I can hardcode like 'Jan' as Month,......Etc....

Year I need to pass a Variable based on the file name...

 

my calculation should be like 03/01/2019 Jackson got 12 marks

Taoufiq_Zarra

I'm sorry, but I still can't understand

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉
QlikView_99
Contributor III
Contributor III
Author

Ohhh... Sorry to hear it...

If you observe in the Excel sheet we have different tabs as months and each tab holds the data for that particular month, in month of January there are seven students and each of them write the exams in every week and every day. Below is the screenshot where the I filtered a particular student and that student took exam all the days in a week and he took for the all four weeks in January 2019.

Now what is need is the date for Tuesday of Week1 in January , Wednesday of Week1 in January and so on.......

 
 
 

 

Student Jackson filtered for Jan.png

QlikView_99
Contributor III
Contributor III
Author

Thanks for your support and I got the way to solve it.

we can left join a inline table with Day and Num then we can get the Date. 

left join(student_Table)

load * Inline

[Day,Num

Monday,0

.

.

Etc...];

 

Calc:

Load *,

Makedate(Year,Month,Num) as Date

Resident student_table;