Convert text to Date/time - Answers - Salesforce Trailblazer Community
Trailblazer Community
Ask Search:
Stanislaw KowzaStanislaw Kowza 

Convert text to Date/time

Hi
Could anyone tell if it is possible to convert text "March 8, 2016 1:00 PM" to date/time formula "3/8/2016 1:00 PM". Im using flow to collect data and date/time field is not there.First i collect date and time as a text then put them together into text field but i need a date/time field for a calculation.

Kind regards
S.Kowza
Best Answer chosen by Stanislaw Kowza
Mayank SrivastavaMayank Srivastava
Try this:
DATETIMEVALUE( TEXT({!Date}) +" "+ TEXT({!Time}))

All Answers

Mayank SrivastavaMayank Srivastava
Stanislaw, the following post on stackexchange has the solution to this limitation:
http://salesforce.stackexchange.com/questions/78885/flow-designer-how-to-add-datetime-or-time-input-field-on-screen
Stanislaw KowzaStanislaw Kowza
I see a progress unfortunatelly formula:
DATETIMEVALUE({!Date}+" "+{!Time})
Is invalid: incorect parameter type of operator "+"
If I remove "+" i get a syntax error.Found 'date'
Mayank SrivastavaMayank Srivastava
Try this:
DATETIMEVALUE( TEXT({!Date}) +" "+ TEXT({!Time}))
This was selected as the best answer
Stanislaw KowzaStanislaw Kowza
Thank you.
This formula sort my problem.