Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Urgent help in date please!

Hi ,

I have a problem in date field as it is showing dates since 1899. This problem happens today. Please can anyone suggest me as I did all search but not successful.

Thanks.

17 Replies
ashfaq_haseeb
Champion III
Champion III

Hi,

Make you master calendar as last tab.

Load

Date,

Month

Year

etc

From MasterCalenda.qvd(qvd)

where exsists(Date,Date)

Regards

ASHFAQ

senpradip007
Specialist III
Specialist III

Can you share your script?

Not applicable
Author

Thanks. Please see below


SortMap:
MAPPING LOAD * INLINE [
    Month, MonthSort
    Jul, 1
    Aug, 2
    Sep, 3
    Oct, 4
    Nov, 5
    Dec, 6
    Jan, 7
    Feb, 8
    Mar, 9
    Apr, 10
    May, 11
    Jun, 12
   
];


Calendar:
LOAD Date(Floor(Date),'DD/MM/YYYY')                              as CommonDate,
     Date_TS,
     Today,
     Week,
     Week as %keyCaseWeek,
     Year,
     Text(Month)                       as Month,
     ApplyMap('SortMap',Text(Month))   as MonthSort,
     Day,
     WeekDay,
     Quarter,
     MonthYear,
     WeekYear,
     CurYTDFlag,
     LastYTDFlag,
     FiscalYear,
     FiscalYearStart,
     FiscalWeek,
     FiscalWeekSerial,
     FiscalQuarter
FROM
D:\Qlikview\QVD\Closures_QVD\Closures_QVD_Completions\MasterCalendar.qvd
(qvd);


CurrentFinancialWeek:

LOAD Year,Week,FiscalWeek,FiscalWeekSerial,FiscalYear,FiscalYearStart RESIDENT Calendar WHERE Week=(Week(Today())) and Year=Year(Today())
Order BY Year ASC;

LET curFiscalWeek=Peek('FiscalWeek',0,CurrentFinancialWeek);
LET curFiscalYear=Peek('FiscalYear',0,CurrentFinancialWeek);
LET curWeek=Peek('Week',0,CurrentFinancialWeek);
LET curYear=Peek('Year',0,CurrentFinancialWeek);
LET curFiscalWeekSeq=Peek('FiscalWeekSerial',0,CurrentFinancialWeek);
LET curFiscalYearStart=Peek('FiscalYearStart',0,CurrentFinancialWeek);

DROP TABLE CurrentFinancialWeek;

dmac1971
Creator III
Creator III


Using that data and my master Calendar everything seems to be fine?

PrashantSangle

Hi,

Just check the date format you mention in script level.

use YearName(DateField).

or try with

YearName(Date(Date#(DateField,'DD/MM/YYYY')))

Try with

use YearName(DateField,0,4).

or try with

YearName(Date(Date#(DateField,'DD/MM/YYYY')),0,4)

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Not applicable
Author

Thanks, where I need to use this in my script?

Not applicable
Author

Thanks. I have checked yours and it is fine. I am not getting where is the problem in mine? Any help please.

Not applicable
Author

I have found the problem as there is a data reload problem from database and I checked this and reloaded the file again.

Thanks for all replies.