2.1.8.39 systemtime_to_tm


Description

convert system time struct to tm struct.

Syntax

void systemtime_to_tm( TM * pTM, SYSTEMTIME * pSysTime )

Parameters

pTM
[modify]pointer to a TM structure to receive converted data
pSysTime
[input]pointer to a SYSTEMTIME structure

Return

Examples

EX1

void systemtime_to_tm_Ex1()
{
	struct tm theTime ;
	SYSTEMTIME sysTime ;
	GetSystemTime(&sysTime);
	
	systemtime_to_tm(&theTime ,&sysTime);
	
	printf( "The current date and time are: %s", asctime(&theTime));
}

Remark

See Also

tm_to_systemtime, asctime

Header to Include

origin.h

Reference