10.07.2015 Views

Programming Guide - Actian

Programming Guide - Actian

Programming Guide - Actian

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

System-defined FunctionsSome date functions require you to specify a unit parameter; unit parametersmust be specified using a quoted string. The following table lists valid unitparameters:Date PortionSecondMinuteHourDayWeekMonthQuarterYearHow Specifiedsecond, seconds, sec, secsminute, minutes, min, minshour, hours, hr, hrsday, daysweek, weeks, wk, wksmonth, months, mo, mosquarter, quarters, qtr, qtrsyear, years, yr, yrsThe following table lists the date functions:NameFormat(Result)Descriptiondate_trunc(unit,date) date Returns a date value truncatedto the specified unitdate_part(unit,date) integer Returns an integer containingthe specified (unit) componentof the input datedate_gmt(date)anycharacterdata typeConverts an absolute date intothe Greenwich Mean Timecharacter equivalent with theformat yyyy_mm_dd hh:mm:ssGMT. If the absolute date doesnot include a time, Ingresreturns blanks for the timeportion of the result.For example, the query:select date_gmt('1-1-9310:13 PM PST')returns the following value:'1993_01_01 06:13:00 GMT'.58 <strong>Programming</strong> <strong>Guide</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!