function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
michaellmichaell 

Filling in a DateTime from a Pick List

Hi,

I'm toying around with something.  I've got two pick lists -- one that represents a day, and another that represents a small selection of times.

What I'd like to do is find a way to combine those two to fill out a third datetime field.  I think I'd need a trigger (instead of a workflow rule) in order to best do this.  But I'm not quite sure what would be the best way to go about this, especially as I come up to speed on the various Apex syntax.

Thanks,
Michael
DoItAloneDoItAlone
Why wouldn't you just use a forumla field to pull those values and make a read only field with the date?
michaellmichaell
That very much may be the solution -- I'm struggling a bit with getting datetime values from picklist values though. 
michaellmichaell
I couldn't find a way to build a date-time value in a formula, but I could create a new date from an Apex trigger, and that worked.