Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

where expression with current year

Hi experts

I would like to load data but only data from the current year. this is my expression:

resident job where Jahr = 2014 group by prodnr;

How can I define the current year instead of hardcoding it?

Additionally, I would like to load data from last year but only until the current date last year.

How would I habe to script this?

Thank you very much for your help!

Jan

1 Solution

Accepted Solutions
alexandros17
Partner - Champion III
Partner - Champion III

Year(Today())

let me know

View solution in original post

4 Replies
alexandros17
Partner - Champion III
Partner - Champion III

Year(Today())

let me know

Not applicable
Author

Hi Allesandro

Works, cool. Do you also have an expression for the second part of my question?

Thank you for your help!

Jan

Not applicable
Author

Hi Jan,

You can use the year(today()) functions in order to find the current year.

Just use the where YourDateField>=makedate(year(today())-1,month(today()),day(today()))

regards

Not applicable
Author

Hi

Thank you for your help!

Hm, that expression did not work for me...

Jan