Solved

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

Posted on 2008-06-19
2
532 Views
Last Modified: 2012-05-05
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
Comment
Question by:Voltus_WoW
2 Comments
 
LVL 55

Accepted Solution

by:
Jaime Olivares earned 500 total points
ID: 21828089
you can do something like:

DateTime dt = (new DateTime(1901,1,1)).AddSeconds(yourRWTime value here);
0
 

Author Comment

by:Voltus_WoW
ID: 21833314
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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

778 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question