Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]


Using TDateTime

[Top]


TDateTime()

The example below shows how to construct a TDateTime object, initialising it to midnight 6th January 1996;

TDateTime dateTime(1996,EJanuary,5,00,00,00,000000);

[Top]


Set()

When setting the day and month, subtract one because the ranges are offset from zero. For example, to set the date to 31st December 1996:

TDateTime dateTime;
TInt year=1996, month=12, day=31;
dateTime.Set(year,TMonth(month-1),day-1,0,0,0,0);