+ Start a Discussion
R ReayR Reay 

Creating formula with Date/Time output through combining a Date and Time field in SF

Hello,

I want to create a formula to use within a flow that outputs a DATETIME value using seperate inputs from a Date field and Time field. 

I have tried various different formulas, but have yet to get it working. For reference, I have been playing around with formulas such as:

DATETIMEVALUE ( TEXT ( DATEFIELD__c) & " " & (TIMEFIELD__c))

However, none have worked thus far. Appreciate any insight or guidance on this one.

Thank you,

R
Maharajan CMaharajan C
Hi Reay,

Please try the below formula:
 
(DATETIMEVALUE(TEXT(YEAR(DATEFIELD__c)) +"-" +TEXT(MONTH(DATEFIELD__c)) +"-" +TEXT(DAY(DATEFIELD__c)) +" " + TEXT(VALUE(LEFT(TEXT(TIMEFIELD__c), 2))) + MID(TEXT(TIMEFIELD__c),3,3) +":00"))

Thanks,
Maharajan.C
AnkaiahAnkaiah (Salesforce Developers) 
Hi Reay,

try with below formula.
DATETIMEVALUE(TEXT(MONTH(DATEFIELD__c)) +
"/" +TEXT(DAY(DATEFIELD__c)) +
"/" +TEXT(YEAR(DATEFIELD__c)) +" " 
+ TEXT(VALUE(LEFT(TEXT(TIMEFIELD__c), 2))) + MID(TEXT(TIMEFIELD__c),3,3) +":00")

If this helps, Please mark it as best answer.

Thanks!!​​​​​​​
Prateek Prasoon 25Prateek Prasoon 25
 Hey, Reay 
   
You can use this formula :
 
(DATETIMEVALUE(TEXT(YEAR(DATEFIELD__c)) + ":" +
TEXT(MONTH(DATEFIELD__c)) +":"+
TEXT(DAY(DATEFIELD__c)) + " :" +
TEXT(VALUE(LEFT(TEXT(TIMEFIELD__c), 2))) + MID(TEXT(TIMEFIELD__c),3,3) +":00"))


Kindly mark it as the best answer if it helps .
 
Joseph HarvyJoseph Harvy
Не знаєшь  казино з хорошими онлайн іграми. Привіт. Використання сучасних технологій дозволяє досягти цього казино високого рівня безпеки та безпеки персональних даних. Окрім того, офіційне реальне онлайн казино https://slotscity.ua/ пропонує найкращі умови для гри, у тому числі на гроші. Ліцензія казино свідчить про законність діяльності та серйозність намірів. Тому я думаю що це те, що вам треба
anglina voltan 19anglina voltan 19
CVS is one of the largest drugstore chains in the United States that provides high-quality healthcare and wellness solutions. let's check here : cvssurvey