12.07.2015 Views

Caché Transact-SQL (TSQL) Migration Guide - InterSystems ...

Caché Transact-SQL (TSQL) Migration Guide - InterSystems ...

Caché Transact-SQL (TSQL) Migration Guide - InterSystems ...

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.

T<strong>SQL</strong> Functions4.1.11 DATEADDDATEADD(code,num,date)Returns the value of date modified by adding the interval specified in code the num numberof times. The date can be a date, time, or date/time string in a variety of formats. Availablecode values are:yyqqmmdyddwkhhmissmsYearQuarterMonthDay of yearDayWeekHourMinuteSecondMillisecondThe value returned by DATEADD always includes both date and time in the format:yyyy-mm-dd hh:mm:ss.nFractional seconds are only returned if the source contained fractional seconds.If a date is not specified (that is, if date contains only a time value), it defaults to 1/1/1900.If a time is not specified in date, it defaults to 00:00:00. Hours are always returned based ona 24-hour clock.4.1.12 DATEDIFFDATEADD(code,startdate,enddate)Returns the number of code intervals between startdate and enddate. The two dates can bea date, a time, or a date/time string. in the following format:yyyy-mm-dd hh:mm:ss.n30 <strong>Caché</strong> <strong>Transact</strong>-<strong>SQL</strong> (T<strong>SQL</strong>) <strong>Migration</strong> <strong>Guide</strong>

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

Saved successfully!

Ooh no, something went wrong!