Set date time based on current time
Posted on 2014-08-20
I need to set a date/time based on the current date/time. In the example below, if it is between 1pm and 4pm, I want to set the DueDate to the next time it is 12pm, in this case the next day. Sometimes, it may be a time in the current date; for example if it is 5am I want to set it to 12pm the same day in another cfcase. Could someone assist? Thank you.
<cfset vTime=now() />
<cfset DueDate="12:00" /> <!--- I know this is incorrect, it's just here for explaining this --->