When you choose a formula field, choose a Date and then try the below formula
TODAY() + VALUE(Text_FIeld__c)
Try with this formula:
DATETIMEVALUE(
/* get the year */
RIGHT(LEFT(Last_Login__c , FIND(" ", Last_Login__c ) - 1), 4)
& "-" &
/* get the month */
LEFT(Last_Login__c , FIND("/", Last_Login__c ) - 1)
& "-" &
/* get the day */
LEFT(
MID(Last_Login__c, FIND("/", Last_Login__c ) + 1, 4),
FIND("/", MID(Last_Login__c , FIND("/", Last_Login__c ) + 1, 4)) - 1
)
& " " &
/* get the Time */
MID(Last_Login__c ,
FIND(" ", Last_Login__c ),
LEN(Last_Login__c ) - FIND(" ",Last_Login__c ) + 1
)
)
This, essentially, resolves to: DATETIMEVALUE("2012-12-30 8:54:07 PM")
A free tip - I used another TEXT
formula field for debugging purposes so I could make sure that the formulas inside the above DATETIMEVALUE(..)
resolved to a valid format. Otherwise, all I could see was the #Error!
message in my Date/Time
formula, and that wasn't particularly helpful.
Best Answer
The
DATEVALUE
function is used to convertDate/Time
values into just aDate
value. If you want to convert aText
value into aDate
value, try usingDATE(text)
. See Using Date and Date/Time Values in Formulas for more help withDate
andDate/Time
formulas.