c# - How to retrieve correct value of date only field in SharePoint 2013 workflow -


i new sharepoint 2013 workflows years of general c# , other sharepoint experience.

my problem timezones. developing list workflow in visual studio 2013 has take actions based on value of date field of current item in list. retrieving value of field using getdynamicvalueproperties , assign variable. if check value, can see not correct 23:00 on day before 1 set list item. assuming because no matter being date field, behind scenes still being stored in regular datetime object.

because of this, date calculations 1 day off (because use date part). have noticed timezone specific classes , methods cannot used within workflow.

is there way can correctly retrieve date part of field value without hardcoding offsets? preferably looking solution not include workarounds , hacks , works in environments.

background information: have execute tasks n days before date @ given time (e.g. 8 am). second part tricky too, time part 1 hour off because of this. looking solution too.

managed solve calling appropriate sharepoint rest api endpoints in httpsend activity.

sptimezone.utctolocaltime endpoint

sptimezone.localtimetoutc endpoint

i passing original date url parameter , receive converted date in json object can parsed in workflow. conversion occurrs according site collection regional settings.

note: when converting local utc, result string contains "z" character @ end, indicating indeed utc date. when parsing whole string datetime in workflow, converts original date because of this. have cut last character using string.substring method, , working fine now.


Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -