Archived Forum Post

Index of archived forum posts

Question:

How to Load a Chilkat CkDateTime Object from a C# System.DateTime Object?

Sep 13 '16 at 08:14

How can I load a Chilkat CkDateTime object from a C# System.DateTime object?


Answer

DateTime dtCSharp = DateTime.Now;

Chilkat.CkDateTime dt = new Chilkat.CkDateTime();
bool bFromLocalTicks = true;
dt.SetFromDateTimeTicks(bFromLocalTicks,dtCSharp.Ticks);

bool bGetAsLocal = true;
MessageBox.Show(dt.GetAsRfc822(bGetAsLocal));