How do I display current date in report?

How do I display current date in report?

Postby JohnKlassen » Sun Jan 27, 2013 1:34 pm

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
JohnKlassen
 
Posts: 148
Joined: Wed Dec 05, 2012 1:26 pm

Re: How do I display current date in report?

Postby zazzium » Sun Jan 27, 2013 7:34 pm

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
zazzium
 
Posts: 84
Joined: Mon Jul 04, 2011 8:22 am

Re: How do I display current date in report?

Postby JohnKlassen » Mon Jan 28, 2013 2:30 am

Hi,

That worked!

Thanks for your help.

John
JohnKlassen
 
Posts: 148
Joined: Wed Dec 05, 2012 1:26 pm

Re: How do I display current date in report?

Postby admin » Mon Feb 04, 2013 12:32 pm

.
admin
Site Admin
 
Posts: 3136
Joined: Mon Jun 15, 2009 9:53 am


Return to Report Writer



cron