PC Review


Reply
Thread Tools Rate Thread

CTime equivalent in C#

 
 
L
Guest
Posts: n/a
 
      24th Mar 2005
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.

 
Reply With Quote
 
 
 
 
Dan Bass
Guest
Posts: n/a
 
      24th Mar 2005
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");


"L" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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.
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to convert DBTIMESTAMP to CTime? =?Utf-8?B?c2hpbA==?= Microsoft VC .NET 0 20th Nov 2007 12:31 PM
Convert double value return by Outlook api to CTime amit deshpande Microsoft Outlook VBA Programming 2 27th Jun 2006 05:56 AM
Converting CTime read from a C++ archive file Claire Microsoft C# .NET 2 15th Feb 2005 02:46 PM
convert a C++ CTime to a C# DateTime Chris Microsoft C# .NET 2 22nd Dec 2004 04:24 PM
ctime conversion in Access Ulrich Microsoft Access VBA Modules 2 29th Aug 2003 06:51 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:48 AM.