In my C# program I'm receiving datetime from a PLC. It is sending data in "ulong" format. How can I convert ulong to DateTime format? for example I am receiving:
ulong timeN = 99844490909448899;//time in nanoseconds
then I need to convert it into DateTime ("MM/dd/yyyy hh:mm:ss") format.
How can I solve this?
This gives a date time of:
01 March 2003 14:34:50
using the following call: