GSAK (Geocaching Swiss Army Knife)
 

Contents - Index


SQL - Date functions


Several date functions make working with date strings easier.

YEAR
Extracts the integer year part of a yyyy-mm-dd date string.

MONTH
Extracts the integer month part of a yyyy-mm-dd date string.

DAY
Extracts the integer day part of a yyyy-mm-dd date string.

WEEKNUMBER
Returns the integer weeknumber of a yyyy-mm-dd date string.

DATEADD
Adds a given number of time intervals to a given data and returns the resulting data as a yyyy-mm-dd data string.

Syntax:

DATEADD(interval,number,datestring)
 
Interval can be: 'd' (day), 'm' (month), 'y' (year), 'w' (week), 'q' (quarter).
Number must be an integer number.
datestring must be in the yyyy-mm-dd format.

Copyright 2004-2008 CWE Computer Services  
Privacy Policy Contact