CTime equivalent in C#

  • Thread starter Thread starter L
  • Start date Start date
L

L

Hi,

In C++ the code below sets CurrentMainFrameTime to 1111635540

intMFMonth = 3;
intMFDay = 23;
intMFHour = 19;
intMFMin = 39;

CTime
CurrentMainFrameTime(CTime::GetCurrentTime().GetYear(),intMFMonth,intMFDay,intMFHour,intMFMin,0);

How can I achieve the same in C#.

Thanks,
Lalasa.
 
This would be done using DateTime (which incidently is a .Net data type, not
just for C#).

DateTime snappedDate = DateTime.Now;

string snappedString = snappedDate.ToString ( "dd MMM yyyy HH:mm:ss" );

DateTime specificDate = DateTime.Parse("12 Jun 2004 13:23:32");
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top