Can someone suggest me how I can convert a variable that contain time in millisec to an exact date? The code is below:
long long SenderTimestamp=System::currentTimeMillis();
obviously the time in millisec is in the variable SenderTimestamp
Thanks
Can someone suggest me how I can convert a variable that contain time in millisec to an exact date? The code is below:
long long SenderTimestamp=System::currentTimeMillis();
obviously the time in millisec is in the variable SenderTimestamp
Thanks
In your case this is simpler :
int seconds = (int) (milliseconds / 1000) % 60 ;
int minutes = (int) ((milliseconds / (1000*60)) % 60);
int hours = (int) ((milliseconds / (1000*60*60)) % 24);