Function
|
Use
|
.NET Framework equivalent
|
|---|
asctime, _wasctime, asctime_s, _wasctime_s
|
Convert time from type struct tm to character string. The versions of these functions with the _s suffix are more secure.
|
System::DateTime::ToLongDateString, System::DateTime::ToLongTimeString, System::DateTime::ToShortDateString, System::DateTime::ToShortTimeString, System::DateTime::ToString
|
clock
|
Return elapsed CPU time for process.
|
Not applicable. To call the standard C function, use PInvoke. For more information, see Platform Invoke Examples.
|
ctime, _ctime32, _ctime64, _wctime, _wctime32, _wctime64, _ctime_s, _ctime32_s, _ctime64_s, _wctime_s, _wctime32_s, _wctime64_s
|
Convert time from type time_t, __time32_t or __time64_t to character string. The versions of these functions with the _s suffix are more secure.
|
System::DateTime::GetDateTimeFormats, System::DateTime::ToString, System::DateTime::ToLongTimeString, System::DateTime::ToShortTimeString
|
difftime, _difftime32, _difftime64
|
Compute difference between two times.
|
System::DateTime::Subtract
|
_ftime, _ftime32, _ftime64,_ftime_s, _ftime32_s, _ftime64_s
|
Store current system time in variable of type struct _timeb or type struct __timeb64 The versions of these functions with the _s suffix are more secure.
|
System::DateTime::Now
|
_futime, _futime32, _futime64
|
Set modification time on open file
|
System::IO::File::SetLastAccessTime, System::IO::File::SetLastWriteTime, System::IO::File::SetCreationTime
|
gmtime, _gmtime32, _gmtime64, _gmtime_s, _gmtime32_s, _gmtime64_s
|
Convert time from type time_t to struct tm or from type __time64_t to struct tm.The versions of these functions with the _s suffix are more secure.
|
System::DateTime::UtcNow, System::DateTime::ToUniversalTime
|
localtime, _localtime32, _localtime64, localtime_s, _localtime32_s, _localtime64_s
|
Convert time from type time_t to struct tm or from type __time64_t to struct tmwith local correction. The versions of these functions with the _s suffix are more secure.
|
System::DateTime::ToLocalTime
|
_mkgmtime, _mkgmtime32, _mkgmtime64
|
Convert time to calendar value in Greenwich Mean Time.
|
System::DateTime::ToUniversalTime
|
mktime, _mktime32, _mktime64
|
Convert time to calendar value.
|
System::DateTime::DateTime
|
_strdate, _wstrdate, _strdate_s, _wstrdate_s
|
Return current system date as string. The versions of these functions with the _s suffix are more secure.
|
System::DateTime::Parse
|
strftime, wcsftime, _strftime_l, _wcsftime_l
|
Format date-and-time string for international use.
|
System::DateTime::ToLongDateString, System::DateTime::ToLongTimeString, System::DateTime::ToShortDateString, System::DateTime::ToShortTimeString, System::DateTime::ToString
|
_strtime, _wstrtime, _strtime_s, _wstrtime_s
|
Return current system time as string. The versions of these functions with the _s suffix are more secure.
|
System::DateTime::ToLongDateString, System::DateTime::ToLongTimeString, System::DateTime::ToShortDateString, System::DateTime::ToShortTimeString, System::DateTime::ToString
|
time, _time32, _time64
|
Get current system time as type time_t, __time32_t or as type __time64_t.
|
Not applicable. To call the standard C function, use PInvoke. For more information, see Platform Invoke Examples.
|
_tzset
|
Set external time variables from environment time variable TZ.
|
Not applicable. To call the standard C function, use PInvoke. For more information, see Platform Invoke Examples.
|
_utime, _utime32, _utime64, _wutime, _wutime32, _wutime64
|
Set modification time for specified file using either current time or time value stored in structure.
|
Not applicable. To call the standard C function, use PInvoke. For more information, see Platform Invoke Examples.
|