Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DateTime Calculation 2

Status
Not open for further replies.

PaulNewns

Programmer
Jun 22, 2005
2
GB
I am trying to get the number of months between two date in a select statement with
'22/06/2005' - edat AS Period

but it returns the only the number of days and i have tried vaious things but seem only get errors. I have also tried UNITS Months but this returns a binary that i can't read. Can anyone help please.
 
Assuming you have set date format to dmy4/

select substr(today,4,2) - substr(edat,4,2) ...
would give a rough calculation
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top