Page 1 of 1

How do I display current date in report?

Posted: Sun Jan 27, 2013 5:04 am
by JohnKlassen
Hi,

I have created a letter using report builder. The letter gets data from 4 different tables. The only thing left is displaying the current date in the report.

I am familiar with creating a label containing '=NOW()' in the report but that displays the current date AND time. I want to only display the current date.

Any suggestions?

Thanks,

John

Re: How do I display current date in report?

Posted: Sun Jan 27, 2013 11:04 am
by zazzium
I use this:

add

Code: Select all

DATE_FORMAT(CURDATE(),'%d.%m.%Y') AS add_date
to the report generator sql (%d.%m.%Y - set your preferred date format )

for example:

Code: Select all

CREATE TABLE #dataTable# SELECT *, DATE_FORMAT(CURDATE(),'%d.%m.%Y') AS add_date FROM invoice ...
add a field object named add_date to report design.

zazzium

Re: How do I display current date in report?

Posted: Sun Jan 27, 2013 6:00 pm
by JohnKlassen
Hi,

That worked!

Thanks for your help.

John

Re: How do I display current date in report?

Posted: Mon Feb 04, 2013 4:02 am
by admin
.