Set date picker to first day of current year?

Hello all,

How do I set the date picker to default to the first day of the current year?

I’ve tried:

DATE(“1/1/YEAR(TODAY())”)

This shows as a valid expression but the date picker is blank when using it.

Thanks :slightly_smiling_face:

1 Like

The date picker is purely a function of the browser or OS that you’re using the app on, Appsheet has zero control over it.

1 Like

Sorry, I don’t think I’ve explained myself properly. I have a date column that I’d like to default to 1st January of the current year. I’ve used the expression above in the initial value of the column.

1 Like

Oh, gotcha.

Yah that expression won’t work, because expressions don’t evaluate if they are inside of quotations. You can try concatenating the values.

DATE("1/1/" & YEAR(TODAY()) )

The ampersand is shorthand for the CONCATENATE() expression.

3 Likes

Thanks marc. That worked. Good to know the concat shorthand. I had tried the regular text CONCATENATE() but that obviously did not work. Thanks again.

You will need a concatenation to have the 1 January part set statically then the year defined dynamically. So an expression like these two would work.

“1/1/” & YEAR(TODAY())

CONCATENATE(“1/1/”,YEAR(TODAY()))

Make sure your column type is set to a date and then all should be set. Let me know if you have any additional questions.

Craig

QREW Technologies

CONCATENATE() Help

2 Likes

Thank you Craig.

1 Like