You need to sign in to do that
Don't have an account?
Melissa Parker 03
convert Date Time field to text in formula field
I have two reporting snapshots that run at different times, 12am PST Weekly and 1am PST Monthly, and saved to the same Source Object.
I'm trying to create a TEXT formula field that referenced the Snapshot Exeuction Time. I would like to display "Weekly" if the time is 12am and "Monthly" when the time is 1am.
I also understand that the Snapshot Exeuction Time displays in GMT time.
Im having difficulty creating this formula field. Can someone please assist? Thanks.
I'm trying to create a TEXT formula field that referenced the Snapshot Exeuction Time. I would like to display "Weekly" if the time is 12am and "Monthly" when the time is 1am.
I also understand that the Snapshot Exeuction Time displays in GMT time.
Im having difficulty creating this formula field. Can someone please assist? Thanks.
Getting st, nd, etc... is going to be tougher. Below is a formula without that.
CASE(day(datevalue(CreatedDate)),
1, "Sunday",
2, "Monday",
3, "Tuesday",
4, "Wednesday",
5, "Thursday",
6, "Friday",
7, "Saturday",
""
)
&
", "
&
CASE(MONTH(datevalue(CreatedDate)),
1, "January",
2, "February",
3, "March",
4, "April",
5, "May",
6, "June",
7, "July",
8, "August",
9, "September",
10, "October",
11, "November",
12, "December",
"None"
)
&
" "
&
text(day(datevalue(CreatedDate)))
&
" at "
&
MID ( TEXT (CreatedDate ), 12, 5)
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks,
Ajay Dubedi
If(
TEXT(timevalue( Snapshot_Execution_Time__c ))="12:10:000.00","Weekly", "Monthly")
I'm havin trouble with the :10 AM portion of the formula. Perhaps I need to include the MINUTE function as well to capture :10. I'm receivings different errors.
If(
TEXT(timevalue( Snapshot_Execution_Time__c ))="12:10:000.00","Weekly", "Monthly")
I'm havin trouble with the :10 AM portion of the formula. Perhaps I need to include the MINUTE function as well to capture :10. I'm receivings different errors.
If(
(hour(timevalue( Snapshot_Execution_Time__c )) == "12:10:00.000"),"Weekly", "Monthly")
Receiving error: Error: Incorrect parameter type for operator '='. Expected Number, received Text