Posted Wed, 07 Feb 2018 22:12:26 GMT by Chris McFarland Sr. Document Workflow Specialist

Hello, Everyone:

I'm using a WF_RECEIVED_ON variable to show when an item came into a user's Task, and in general it does the trick, but there are two factors that I'm interested in learning more about:

-  Time is off by a few hours, and server time's on the money so I'm not sure where it's pulling time.  Perhaps from the SQL Server?

-  Can I have 12 Hour Time instead of 24 Hour Time?

Thanks for taking a look!

Posted Thu, 08 Feb 2018 12:49:51 GMT by Phil Robson DocuWare Corporation Senior Director Professional Services, Americas

Chris,
That time will be in UTC. Apply your local offset for local time. You could use an arithmetic expression to convert it to another variable for local time.

LOCAL_RECEIVED_ON = DateAdd("h", -5,WF_RECEIVED_ON). This converts UTC to EST. However it does not take into account DST. You will need another expression using an IF/THEN.

Of course, it becomes a bit complex because DST starts and ends on a specific day of the month not a date.

Ultimately, it may be easier to have a local webservice figure out if DST is active and return the number of hours to substract for your variable.
 

VarDST = (Call web service to get the number of hours)

LOCAL_RECEIVED_ON = DateAdd("h", VarDST,WF_RECEIVED_ON)

 

Phil Robson
Senior Director Support Americas

 

 

 

 

 

 

Posted Thu, 08 Feb 2018 16:30:06 GMT by Chris McFarland Sr. Document Workflow Specialist

OK, that's all good for me. I'll probably start out simple and just adjust for the number of hours without worrying about DST at this point.  If I meet with little resistance, maybe I'll do the DST accommodation now...

Thanks, Phil.

You must be signed in to post in this forum.