[SalesForce] Merge Date & Time field in to datetime field using formula field

We have to separate fields to pick appointment date & appointment time in Custom object.
Now we have to filter out appointments between two dates (w/ time), so I need to compare appointment date & time both.
For that, I am thinking to create a Formula field which takes both appointment date & time & provide appointment date & time in date/time type. Please provide formula to do so

Best Answer

You can handle this in Apex like this:

DateTime dt = DateTime.newInstance(myDate, myTime);
Related Topic