The CreatorCon Call for Content is officially open! Get started here.

Conversion of Dates to DateTime fields

Uncle Rob
Kilo Patron

We're currently using the Relative Duration module in an effort to create an SLA that uses a user defined end time.

I managed to build this successfully in Demo, but when I started building in my own system I had a huge problem with respect to dates. I can't get my original formulation to work when the input is a date field rather than a date/time.

Is there an easy way to convert a date to datetime? I'd like to assume that the "time" is 00:00:00. It'd be even better if I could change this assumption (like 08:00:00 for example).

7 REPLIES 7

mon4
Giga Contributor

Hi Jued0001, did you find any solution to this issue?


Found this blog post while trying to find an easy way to convert week_starts_on in time_card into a GlideDateTime I could use for a fiscal year calculation:



Convert Date to Date Time


mon4
Giga Contributor

Thanks, Anthony!   This is really helpful.   This is exactly what I was looking for.