Using ToDateTime in architect

Is it possible to use ToDateTime to create a custom schedule observed in a task?

for example;
I want to build a case where Case1 would observe a range timeframe and range date.
I wanted to use the ToDateTime function and in the implementation it states that the format has to be in exact certain formats.

if I wanted to observe a date range but it appears that is not possible according to the implementation instructions in the Function library, correct?
i.e. ToDateTime Value ToReturn

ToDateTime(MakeDateTime(2003, 10, 25, 16, 0, 0)) // how it says to write it, but I want to use sort of a wildcard or a way to use a range of Monday thru Friday but I don't think that is possible.

Thanks.

I'm not sure exactly what you're trying to check for, but for example if you're trying to figure out if it's a weekday, you could do something like this in an expression:

DayOfWeek(Flow.StartDateTimeUtc) > 1 and DayOfWeek(Flow.StartDateTimeUtc) < 7

Or if you're trying to check for an explicit DateTime range, you could use the DateTimeDiff function in a similar manner to check if your variable is greater than one date and less than other. Does that help?

yes this actually helps a lot and I wasn't aware of DateTimeDiff either.

I was actually trying to check for Monday thru Friday 9AM-4PM thinking I could use ToDateTime, but it sounds like there are other functions that I should look into according to your comment.

I presume base on your comments that I need to argue it out a bit more in the expression editor to accomplish what I need, right?

AM

Yea, you can use a combination of checks using DayOfWeek() and Hour() to check that timeframe.

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.