0% found this document useful (0 votes)
3 views1 page

Date Formats

The document outlines various Meta-SQL date/time constructs for input and output, including current date/time, any date/time, and null date/time. It also describes functions for extracting parts of date/time and performing date arithmetic, such as adding or subtracting days and calculating differences between dates. Key points include the usage of input in the WHERE clause and output in the SELECT clause.

Uploaded by

ameyan16
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views1 page

Date Formats

The document outlines various Meta-SQL date/time constructs for input and output, including current date/time, any date/time, and null date/time. It also describes functions for extracting parts of date/time and performing date arithmetic, such as adding or subtracting days and calculating differences between dates. Key points include the usage of input in the WHERE clause and output in the SELECT clause.

Uploaded by

ameyan16
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

The Meta-SQL date/time constructs you should know about are:

For input/output of the current date/time:

 %CurrentDateIn
 %CurrentDateOut
 %CurrentDateTimeIn
 %CurrentDateTimeOut
 %CurrentTimeIn
 %CurrentTimeOut

For input/output of any date/time:

 %DateIn
 %DateOut
 %DateTimeIn
 %DateTimeOut
 %TimeIn
 %TimeOut

Remember that:

 input date/time goes in the WHERE clause (conditions)


 output date/time goes in the SELECT clause (returned data)

For input/output of a null date/time:

 %DateNull
 %DateTimeNull
 %TimeNull

For getting part of a date/time:

 %DatePart gets the date


 %TimePart gets the time

For date arithmetic:

 %DateAdd(from, days_to_add) gives the resulting date. You can use negative
numbers to get a past date. So this is also the DateSubtract function.
 %DateDiff(from, to) gives the difference between two dates in days
 %DateTimeDiff(from, to) gives the difference between two date/times in minutes

You might also like