Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
srihitha
Contributor III
Contributor III

dayend function not working

Can someone please explain why a1 is empty

SET TimestampFormat='DD/MM/YYYY h:mm:ss[.fff] TT';
a1:
LOAD dayend('25/01/2013 16:45:00',0,0.5) AutoGenerate 1;

Labels (3)
2 Solutions

Accepted Solutions
vchuprina
Specialist
Specialist

Hi,

Your timestamp format doesn’t match your date

Change it from

SET TimestampFormat='DD/MM/YYYY h:mm:ss[.fff] TT';

to
SET TimestampFormat='DD/MM/YYYY h:mm:ss';

a1:
LOAD
     dayend('25/01/2013 16:45:00',0,0.5) AS DayEnd
AutoGenerate 1;

Regards,

Vitalii

Press LIKE if the given solution helps to solve the problem.
If it's possible please mark correct answers as "solutions" (you can mark up to 3 "solutions").

View solution in original post

Vegar
MVP
MVP

Your TimestampFormat variable tells us that your default timestamp format is expected to contains AM or PM.

SET TimestampFormat='DD/MM/YYYY h:mm:ss[.fff] TT';

Try changing your variable like this.

SET TimestampFormat='DD/MM/YYYY h:mm:ss[.fff]';

Then your timestamp '25/01/2013 16:45:00' should be handled correctly.

View solution in original post

3 Replies
vchuprina
Specialist
Specialist

Hi,

Your timestamp format doesn’t match your date

Change it from

SET TimestampFormat='DD/MM/YYYY h:mm:ss[.fff] TT';

to
SET TimestampFormat='DD/MM/YYYY h:mm:ss';

a1:
LOAD
     dayend('25/01/2013 16:45:00',0,0.5) AS DayEnd
AutoGenerate 1;

Regards,

Vitalii

Press LIKE if the given solution helps to solve the problem.
If it's possible please mark correct answers as "solutions" (you can mark up to 3 "solutions").
Vegar
MVP
MVP

Your TimestampFormat variable tells us that your default timestamp format is expected to contains AM or PM.

SET TimestampFormat='DD/MM/YYYY h:mm:ss[.fff] TT';

Try changing your variable like this.

SET TimestampFormat='DD/MM/YYYY h:mm:ss[.fff]';

Then your timestamp '25/01/2013 16:45:00' should be handled correctly.

Vegar
MVP
MVP

Alternative solution

If you can't change your TimestampFormat then you can enforce Qlik to interpret your timestam even if it uses a different pattern. Try this. It should work.

SET TimestampFormat='DD/MM/YYYY h:mm:ss[.fff] TT';

a1:

LOAD dayend(Timestamp#( '25/01/2013 16:45:00''DD/MM/YYYY h:mm:ss') ,0,0.5) AutoGenerate 1;