• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 551
  • Last Modified:

How do I convert a Rogue Wave RWTime to a .NET DateTime?

I am working with code using an old Rogue Wave C++ library.  I am trying to write C++/CLI code to convert a RWTime for use by some C# code (.NET DateTime).  An RWTime can provide me the number of seconds since 1/1/1901.  How can I convert these seconds into a .NET DateTime?  If there is a better way I wouldn't mind hearing about that also.
0
Voltus_WoW
Asked:
Voltus_WoW
1 Solution
 
Jaime OlivaresCommented:
you can do something like:

DateTime dt = (new DateTime(1901,1,1)).AddSeconds(yourRWTime value here);
0
 
Voltus_WoWAuthor Commented:
That is exactly what I needed.  I didn't even see the AddSeconds() method.  All the examples on the web pointed me at TimeSpan.  Thanks for the help!
0

Featured Post

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now