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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
volcore79
Partner - Contributor III
Partner - Contributor III

Previous Day of DATE in script

Hi,

via a load script i get a date field in qlikview. now i need the previous day of this date. how do i get it ?

For example:



LOAD

Date1 as BeginDate,

Date2

as EndDate,

Date1

-1 as DayBeforeBeginDate

FROM

[Test.xlsx]

(



ooxml, no labels, table is Zeitplan);

A,

1 Solution

Accepted Solutions
Miguel_Angel_Baeyens

Hello Volker,

Use the following instead

Date(Date(Date1) - 1) AS DayBeforeBeginDate


Hope that helps

EDIT: Nested Date() so the value is always numeric.

View solution in original post

2 Replies
Miguel_Angel_Baeyens

Hello Volker,

Use the following instead

Date(Date(Date1) - 1) AS DayBeforeBeginDate


Hope that helps

EDIT: Nested Date() so the value is always numeric.

Not applicable

Hi,

Try whit this

MakeDate(year(BeginDate),month(BeginDate),day(BeginDate)-1)