Hi,
My post is around the fact that it appears that K2 Five uses the smalldatetime SQL data type when storing dates (so does not include milliseconds).
For example, it will store '2022-01-01 13:45:12', not '2022-01-01 13:45:12.543'.
I have a scenario:
- I have a SmartBox SmartObject, created via the K2 Designer. It has a DateTime field.
- It is possible that an external process outside of K2 can update the DateTime field directly (i.e. straight into the SQL table).
- When this happens it updates the DateTime field in a format which I now understand is not familiar to K2 (so includes milliseconds).
Issue:
- I want use the GetList method on the SmartObject to obtain all rows based using the DateTime as a parameter.
Example:
- Here is the Date Time column from a SQL perspective:
- Using K2 Management (SmartObject tester), this is what it shows when obtaining the data:
Problem:
- How do I return the top two rows where the Date/Time is 22-04-07 08:52:17.677 ?
- I have tried passing in different variations of the Date/Time, none of which work. For example:
I assumed K2 would do the conversion to small datetime on both sides and pick up the top two rows. So was surprised when I discovered it does that do that?
The obvious workaround is to amend the external process so that it stores the date as a small datetime. By following K2 standard and not including the milliseconds everything works fine.
I'm wondering if there is anything else that can be done? Rather not amend how the external process stamps the date time for several reasons (based on the requirements), unless we have to.
Thanks in advance