AnandVenkat
Novice

Date/ Time difference in K2 workflow

Jump to solution

Hi,

 

I would like to find the "seconds" difference between 2 DateTime values. I am able to do it in the smartform using the "Date/Time Difference" operator. But when i try to do the same in Workflow in K2 studio, i dont find this operators options. Is something am i missing here?

 

TIA

Anand

0 Kudos
Reply
1 Reply
tin
Apprentice

Re: Date/ Time difference in K2 workflow

Jump to solution

It appears that the same "Date/ Time difference" inline function just does not exist in K2 Studio/Visual Studio as it does in the K2 Designer, and the documentation does reflect this difference (although I dont have the reason for this):


 


http://help.k2.com/onlinehelp/k2blackpearl/UserGuide/4.7/default.htm#2.Create/K2_for_VisualStudio_K2...


 


http://help.k2.com/onlinehelp/K2smartforms/UserGuide/4.7/default.htm#SF-ViewDesignerLayout-CalcExpre...


 


Some things that can be done:


 


1.  Perhaps log a request/idea for this to be evaluated and included:


https://ideas.k2.com/


 


2.  Writing your own custom inline function:


http://help.k2.com/onlinehelp/k2blackpearl/DevRef/4.7/default.htm#How_to_create_a_Custom_Inline_Func...


 


3.  Or perhaps use the "Day Difference" inline function that is available in K2 Studio and converting it to seconds:


(Day Difference) * 24hrs * 60min * 60secs

Reply