This topic is locked

How do I remove decimal places?

10/4/2008 6:39:21 AM
PHPRunner General questions
B
birksy30 author

Hi,
I hope somebody can help?
I have a field (date1) in my SQL database which contains a date.
I have included the following code in my SQL query:-
current_date -(date1)
Basically I want to display the number of days elapsed since 'date1'.
This does work, but the returned number format is slightly wrong.
For example, '8' elapsed days is returned as a value of '80.00' and '1' elapsed days is returned as a value of '1.00'.
Any ideas anyone.
Any help appreciated :-)