v2026.6.4
All Bundles
Bundle ODBC database access layer. Connection manages database sessions; Statement and ParameterStatement execute SQL queries; ResultSet iterates over rows and extracts typed column values. Compile with -lib odbc.

Timestamp

ODBC Timestamp holder

Operations

GetDay #

Gets the day

method : public : GetDay() ~ Int

Return

TypeDescription
Intday

GetFraction #

Gets the fraction of seconds

method : public : GetFraction() ~ Int

Return

TypeDescription
Intfraction of seconds

GetHours #

Gets the hours

method : public : GetHours() ~ Int

Return

TypeDescription
Inthours

GetMinutes #

Gets the minutes

method : public : GetMinutes() ~ Int

Return

TypeDescription
Intminutes

GetMonth #

Gets the month

method : public : GetMonth() ~ Int

Return

TypeDescription
Intmonth

GetSeconds #

Gets the seconds

method : public : GetSeconds() ~ Int

Return

TypeDescription
Intseconds

GetYear #

Gets the year

method : public : GetYear() ~ Int

Return

TypeDescription
Intyear

New # constructor

Default constructor

New()

New # constructor

Copy constructor for System.Time.Date

New(date:System.Time.Date)

Parameters

NameTypeDescription
dateDateSystem.Time.Date

SetDay #

Sets the day

method : public : SetDay(day:Int) ~ Nil

Parameters

NameTypeDescription
dayIntvalue

SetHours #

Sets the hours

method : public : SetHours(hours:Int) ~ Nil

Parameters

NameTypeDescription
hoursInthours

SetMinutes #

Sets the minutes

method : public : SetMinutes(minute:Int) ~ Nil

Parameters

NameTypeDescription
minuteIntminutes

SetMonth #

Sets the month

method : public : SetMonth(month:Int) ~ Nil

Parameters

NameTypeDescription
monthIntvalue

SetSeconds #

Sets the seconds

method : public : SetSeconds(second:Int) ~ Nil

Parameters

NameTypeDescription
secondIntseconds

SetYear #

Sets the year

method : public : SetYear(year:Int) ~ Nil

Parameters

NameTypeDescription
yearIntvalue

ToDate #

Converts a timestamp into a system date

method : public : ToDate() ~ System.Time.Date

Return

TypeDescription
Datesystem date

Example

conn := Database.ODBC.Connection->New("mydsn", "user", "pass");
rs := conn->Select("SELECT updated_at FROM log");
if(rs->Next()) {
  ts := rs->GetTimestamp("updated_at");
  sys_date := ts->ToDate(); # convert to System.Time.Date
  sys_date->ToString()->PrintLine();
};
conn->Close();

ToString #

Creates a string representation of the timestamp

method : public : ToString() ~ String

Return

TypeDescription
Stringstring representation of the timestamp