DateTime Extension Functions

Right-click in the XPath editor to select date and time functions used in expressions.

Table 1. DateTime extension functions
Name Description
adjust datetime Reformats the input date and time to match the given output format pattern.
current datetime formatted Returns the current date and time using the specified format.
date diff Returns the difference between two dates.
date part Returns a particular part of the date.
format Returns a date formatted to the specified format.
get day of month Returns the day of the month.
get day of week Returns the day of the week.
get day of year Returns the day of the year.
get hour Returns the hour as a 24-hour clock.
get hour 12 Returns the hour as a 12-hour clock.
get minute Returns the minute.
get month Returns the month.
get name of day Returns the name of the day.
get name of month Returns the name of the month.
get second Returns the second.
get time zone id Returns the time zone.
get year Returns the year.
set day of month Sets the day of the month using a default datetime format.
set day of month with context Sets the day of the month.
set day of week Sets the day of the week using a default datetime format.
set day of week with context Sets the day of the week.
set day of year Sets the day of the year using a default datetime format.
set day of year with context Sets the day of the year.
set hour Sets the hour using a default datetime format.
set hour with context Sets the hour.
set minute Sets the minute using a default datetime format.
set minute with context Sets the minute.
set month Sets the month using a default datetime format.
set month with context Sets the month.
set second Sets the second using a default datetime format.
set second with context Sets the second.
set year Sets the year using a default datetime format.
set year with context Sets the year.
transform date time Reformats the input date and time to match the given output format pattern.
Related concepts
XPath Editor

For product-related issues, contact Sybase Technical Support at 1-800-8SYBASE. Send your feedback on this help topic directly to Sybase Technical Publications: pubs@sybase.com