company logo

DateTime :: setTime - Set time for timestamp value

Setting the time will not affect the date in the timestamp value.

Return value:  Time stamp ( odaba::DateTime & )

A time stamp combines date and time

Implementation overview

Implementation details

  1. Set time value to number of centiseconds
    odaba::DateTime & DateTime  :: setTime ( int32 iCentiseconds )

    The value passed in iCentiSeconds is considered as time value expressed in 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.

  2. to list
  3. Create an empty time value
    odaba::DateTime & DateTime  :: setTime (  )

    The function initializes time to empty.

  4. to list
  5. Set time value from hours, minutes, seconds and centiseconds
    odaba::DateTime & DateTime  :: setTime ( int32 iHour, int32 iMinute, int32 iSecond, int32 iCentisecond )

    Any value might be passed for hour, minutes, seconds and centiseconds. There is no check, whether iHours:iMinutes:iSeconds,iCentiseconds is a valid time value. Instead, each parameter is converted into centiseconds and summed up to the total number of centiseconds stored as time value.

    • iHour - Hour

      Hour of the day.

    • iMinute - Minute

      Minute of the hour.

    • iSecond - Second

      Second of the minute.

    • iCentisecond - Centisecond

      Part (in hundredths) of the second.

  6. to list
  7. 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.

  8. to list
  9. 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.

  10. to list