Comparing Date field with Today's Date

Hi.

What would be the correct expression to compare if the DD/MM part of a date column, say [Start Date], was equal to Today’s DD/MM?

Thanks.

0 7 2,037
7 REPLIES 7

Jeremy_F
Participant V

IF( [Start Date] = Today(), “Yes”, “No” )

Steve
Participant V

left(([start date] & ""), 5) = left((today() & ""), 5)

Did you use the & in here as a quick way to apply CONCATENATE() or TEXT() expression to the dates?

([start date] & "") is equivalent to CONCATENATE([start date], ""). Both convert the Date value in its raw form to a Text value. Where you to use TEXT([start date]), it would convert the Date value to Text, but would reformat the date according to the current locale, rather than keeping the raw form.

I love this hack. Thanks for sharing, Steve. It’s really clever! It was hard for me to find details about what the & character does as it’s not an expression. Are their other characters that can be used like this outside of expressions and, if so, how would I find more info on them?

& is an operator, just as +, -, =, *, /, <, >, <=, and >= are.

See Constructing a Textual Value with Concatenation here for the documentation we have on &:

Thank you @Steve

Top Labels in this Space