DateTime :: setTime - Set time for timestamp value
Setting the time will not affect the date in the timestamp value.
A time stamp combines date and time
Implementation overview
- Set time value to number of centiseconds
DateTime :: setTime ( iCentiseconds ) - Create an empty time value
DateTime :: setTime (  ) - Set time value from hours, minutes, seconds and centiseconds
DateTime :: setTime ( iHour, iMinute, iSecond, iCentisecond ) - Set time from string value
DateTime :: setTime ( sTime ) - Set time value from time value passed
DateTime :: setTime ( cTime )
Implementation details
-
Set time value to number of centiseconds
odaba::DateTime & DateTime  :: setTime ( int32 iCentiseconds )
The value passed in iCentiSeconds is considered as time value converted to number of centiseconds and stored as time value. It is up to the application to interpret the time value as local or standard time value.
- iCentiseconds
- Centiseconds
Time span in hundredths of a second or centiseconds in a time value.
to list
- iCentiseconds
- Centiseconds
-
Create an empty time value
odaba::DateTime & DateTime  :: setTime (  )
The function initializes time to empty.
to list
-
Set time value from hours, minutes, seconds and centiseconds
odaba::DateTime & DateTime  :: setTime ( int32 iHour, int32 iMinute, int32 iSecond, int32 iCentisecond )
The time value is set according to the values passed to iHour:iMinute:iSecond,iCentisecond.
When any of the passed values is less than 0 or iHours is greater than 23, iCentisecond is greater 99 or iMinute or iSecond is greater than 59, the function throws an exception.
- iHour
- Hour
Hour of the day. The value should range from 0 to 23.
- iMinute
- Minute
Minute of the hour. The value should range from 0 to 59.
- iSecond
- Second
Second of the minute. The value should range from 0 to 59.
- iCentisecond
- Centisecond
Part (in hundredths) of the second. The value should range from 0 to 100.
to list
- iHour
- Hour
-
Set time from string value
odaba::DateTime & DateTime  :: setTime ( odaba::String &sTime )
The time value is set to the time value passed in string format.
- sTime
- Time value in string format
Time values are passed as string value with the following format:
hh[:mm[:ss[,cc]
Time values must not contain spaces.
to list
- sTime
- Time value in string format
-
Set time value from time value passed
odaba::DateTime & DateTime  :: setTime ( odaba::Time &cTime )
The function sets the time value to the time value passed in rTime.
- cTime
- Time value
The time value is passed in the ODABA Interface::Time format and provides time in 1/100th seconds.
to list
- cTime
- Time value