• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 558
  • 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.
1 Solution
Jaime OlivaresSoftware ArchitectCommented:
you can do something like:

DateTime dt = (new DateTime(1901,1,1)).AddSeconds(yourRWTime value here);
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!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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