K2 blackpearl: Create DateTime[] from data fields -
i cannot figure out how use datetime maximum function multiple data fields. have 2 (datetime) data fields want maximum value.
the "values" field lets type literal or drop in 1 field. how can create array of 2 fields?
thank you!
ob
i think problem having input not date array of dates: datetime[]
i don´t think function typically made find biggest between 2 dates in 2 datafields.
the way function works need give array , of course second param date.
to so, can use smartobject return list of datetime (when call list, make sure don´t return first, default value).
the function work fine , tell of dates in list 'maximum'.
now, if have to use dates in datafields, first need convert 2 datetime array of datetime. unfortunately, not aware of function able (i may wrong...).
i see 3 options nonetheless:
- you write custom function that: take 2 input , return array of them (there knowledge base article explaining how that)
- you use stored procedure (that call thru smart object) converts 2 data array , can use function mentioned 3 . think may simplify further letting stored procedure find max you. see below.
a simple version #3 be:
declare @d1 datetime declare @d2 datetime set @d1 = getdate() set @d2 = getdate()+100 if (@d1>@d2) select @d1 else select @d2
i hope helps.
Comments
Post a Comment