DateTime :: setDate - Set date for timestamp value
Setting the date value will not affect the time value in the timestamp.
A time stamp combines date and time
Implementation overview
- Create an empty data value
DateTime :: setDate (  ) - - internal feature (not documented)
DateTime :: setDate ( cDate ) - Create date value from day, month and year
DateTime :: setDate ( iDay, iMonth, iYear ) - Set date value from string
DateTime :: setDate ( sDate )
Implementation details
-
Create an empty data value
odaba::DateTime & DateTime  :: setDate (  )
The function initializes date to the current date.
to list
-
- internal feature (not documented)
odaba::DateTime & DateTime  :: setDate ( odaba::Date &cDate )
- cDate
- Date
The date contains day, month and year, but not the time.
to list
- cDate
- Date
-
Create date value from day, month and year
odaba::DateTime & DateTime  :: setDate ( int32 iDay, int32 iMonth, int32 iYear )
The function creates an ODABA date for the day, month and year passed in iDay , iMonth and iYear .
- iDay
- Day
Day of the month according to the Gregorian Calendar.
- iMonth
- Month
Month of the year according to the Gregorian Calendar.
- iYear
- Year
Number of the year (AD).
to list
- iDay
- Day
-
Set date value from string
odaba::DateTime & DateTime  :: setDate ( odaba::String &sDate )
The function sets the date value from the string date passed in sDate . When no date format has been set, the date format is detected automatically from string value as follows:
- contains '.' - DD.MM.YYYY or DD.MM.YY
- contains '/' - MM/DD/YYYY or MM/DD/YY
- contains '-' - YYYY-MM-DD or YY-MM-DD
- else - YYYYMMDD or YYMMDD
- sDate
- Date value in string format
Date values can be passed in different ways as string value:
Standard: yyyy-mm-dd or yyyymmdd
English: mm/dd/yyyy
German: dd.mm.yyyy
The type of date is determined from the separator used.
to list