Ways to get start date and finish dates inside a query from database.

Thanks,

Lico

CURRENT_DATE[()] | CURDATE() | SYSDATE | TODAY = returns current date

Oncoming of month:

DATE EXTRACT(YEAR FROM SYSDATE) +'-'+ EXTRACT(MONTH FROM SYSDATE) +'-01'

http://sqltutorials.blogspot.com/2007/06/sql-first-and-last-day-of-month.html

Only factor that is not covered is how you can retrieve the present date... see rexem's publish.

Use trunc( ... ) and last_day( ... ).

See also: Oracle Forums.

For completeness, oncoming of month:

DATE EXTRACT(YEAR FROM SYSDATE) +'-'+ EXTRACT(MONTH FROM SYSDATE) +'-01'

Finish of month:

DATEADD('DAY', -1, DATEADD('MONTH', 1, DATE EXTRACT(YEAR FROM SYSDATE) +'-'+ EXTRACT(MONTH FROM SYSDATE) +'-01'))