You need to sign in to do that
Don't have an account?
Meggan Landis 11
Formula to populate custom date/time field using static time and today's date
Does anyone know how to write a formula that will populate a date/time field with today's date and 12:00 PM? I can't just use TODAY() because I need to be able to filter specifically for the 12:00 PM time stamp. Thanks!
DATETIMEVALUE(TEXT(TODAY())+" 06:30:00")
above formula can be used to generate what you require,
" 06:30:00" --> This I have done to adjust my local time zone, as I am in IST it is +5:30 from GMT so whatever is your timezone you can calculate like
"12:00:00" - (your time zone offset), my offset was +5:30 so it was substracted if your offset is -5:30 then it will be added and the formula will become
DATETIMEVALUE(TEXT(TODAY())+" 17:30:00")
You can use the DATETIMEVALUE() and DATE() functions in combination with the TEXT() function to achieve this.
In this formula, TODAY() returns today's date, which is passed to the DATE() function to get just the date portion without the time. Then, the TEXT() function is used to convert the date to a string format that can be concatenated with the static time value of 12:00 PM. Finally, the DATETIMEVALUE() function is used to convert the concatenated string to a date/time value.
With this formula, the custom date/time field will be populated with today's date at 12:00 PM, which you can then filter on to get the desired results.
If you find this helpful , please mark this as Best Answer.
Thank you.