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 ๐Ÿ™‚

 

Solved Solved
1 6 675
1 ACCEPTED SOLUTION

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.


View solution in original post

6 REPLIES 6

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.

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.

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.


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 

Thank you Craig. 

Top Labels in this Space