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

DATE RETREIVAL

Hi , i need to create a date field with the following existing fields: i do not have a date field in the model.

File base name :  2010data and sheetname is Jan :  how can i make use of MakeDate function to create a date field of the format DD/MM/YYYY (01/01/2010).    Can anyone suggest an idea please

Regards

1 Solution

Accepted Solutions
tresesco
MVP
MVP

Try like:

Load

          MakeDate(Left([File base name],4), Num(Month(Date#(Sheetname, 'MMM')))) as Date

Or,

          Date(Date#(Left([File base name],4)&Sheetname, 'YYYYMMM')) as Date

View solution in original post

3 Replies
YoussefBelloum
Champion
Champion

Hi,

what do you mean by Sheetname is Jan ?

do you want to create new date field on the script ?

tresesco
MVP
MVP

Try like:

Load

          MakeDate(Left([File base name],4), Num(Month(Date#(Sheetname, 'MMM')))) as Date

Or,

          Date(Date#(Left([File base name],4)&Sheetname, 'YYYYMMM')) as Date

Anonymous
Not applicable
Author

Hi Youssef,

yes , i need to create a new date field in the script. I have FileBaseName field as 2010data   and SheetName field as Jan, Feb ,Mar ...so on ....

Thanks for your reply Youssef , i managed to sort it out.

Regards