PC Review


Reply
Thread Tools Rate Thread

Adding Time as well as data in Report Page Footer

 
 
mark909
Guest
Posts: n/a
 
      20th Apr 2009
=NOW() function returns the current date when you create a report.

How do I set up this function to return the time the report was created as
well as the date?

Thanks for help
 
Reply With Quote
 
 
 
 
Wayne-I-M
Guest
Posts: n/a
 
      20th Apr 2009
Hi Mark

There are lots of ways
=Date() &" "&Time()

or

="This report was produced on " & Format(Date(),"DDD MMM YYYY") & " at " &
Format(Now(),"h:nn AM/PM")

etc
etc
etc

Hope this helps

--
Wayne
Trentino, Italia.



"mark909" wrote:

> =NOW() function returns the current date when you create a report.
>
> How do I set up this function to return the time the report was created as
> well as the date?
>
> Thanks for help

 
Reply With Quote
 
mark909
Guest
Posts: n/a
 
      20th Apr 2009
Thanks Wayne thats great.

For:

=Date() &" "&Time()

How do I get Time() to display if the time is am or pm??



"Wayne-I-M" wrote:

> Hi Mark
>
> There are lots of ways
> =Date() &" "&Time()
>
> or
>
> ="This report was produced on " & Format(Date(),"DDD MMM YYYY") & " at " &
> Format(Now(),"h:nn AM/PM")
>
> etc
> etc
> etc
>
> Hope this helps
>
> --
> Wayne
> Trentino, Italia.
>
>
>
> "mark909" wrote:
>
> > =NOW() function returns the current date when you create a report.
> >
> > How do I set up this function to return the time the report was created as
> > well as the date?
> >
> > Thanks for help

 
Reply With Quote
 
Wayne-I-M
Guest
Posts: n/a
 
      20th Apr 2009
Change the format to Medium Time


--
Wayne
Trentino, Italia.



"mark909" wrote:

> Thanks Wayne thats great.
>
> For:
>
> =Date() &" "&Time()
>
> How do I get Time() to display if the time is am or pm??
>
>
>
> "Wayne-I-M" wrote:
>
> > Hi Mark
> >
> > There are lots of ways
> > =Date() &" "&Time()
> >
> > or
> >
> > ="This report was produced on " & Format(Date(),"DDD MMM YYYY") & " at " &
> > Format(Now(),"h:nn AM/PM")
> >
> > etc
> > etc
> > etc
> >
> > Hope this helps
> >
> > --
> > Wayne
> > Trentino, Italia.
> >
> >
> >
> > "mark909" wrote:
> >
> > > =NOW() function returns the current date when you create a report.
> > >
> > > How do I set up this function to return the time the report was created as
> > > well as the date?
> > >
> > > Thanks for help

 
Reply With Quote
 
Wayne-I-M
Guest
Posts: n/a
 
      20th Apr 2009
Simpler method

=Format(Date(),"DD/MM/YY") & " " & Format(Now(),"h:nn AM/PM")


--
Wayne
Trentino, Italia.



"Wayne-I-M" wrote:

> Change the format to Medium Time
>
>
> --
> Wayne
> Trentino, Italia.
>
>
>
> "mark909" wrote:
>
> > Thanks Wayne thats great.
> >
> > For:
> >
> > =Date() &" "&Time()
> >
> > How do I get Time() to display if the time is am or pm??
> >
> >
> >
> > "Wayne-I-M" wrote:
> >
> > > Hi Mark
> > >
> > > There are lots of ways
> > > =Date() &" "&Time()
> > >
> > > or
> > >
> > > ="This report was produced on " & Format(Date(),"DDD MMM YYYY") & " at " &
> > > Format(Now(),"h:nn AM/PM")
> > >
> > > etc
> > > etc
> > > etc
> > >
> > > Hope this helps
> > >
> > > --
> > > Wayne
> > > Trentino, Italia.
> > >
> > >
> > >
> > > "mark909" wrote:
> > >
> > > > =NOW() function returns the current date when you create a report.
> > > >
> > > > How do I set up this function to return the time the report was created as
> > > > well as the date?
> > > >
> > > > Thanks for help

 
Reply With Quote
 
Douglas J. Steele
Guest
Posts: n/a
 
      20th Apr 2009
Now() returns both date and time. If you're not seeing the time, check that
you're formatting the value appropriately.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"mark909" <(E-Mail Removed)> wrote in message
news:A8AE7C6F-DE7C-45EA-9A92-(E-Mail Removed)...
> =NOW() function returns the current date when you create a report.
>
> How do I set up this function to return the time the report was created as
> well as the date?
>
> Thanks for help



 
Reply With Quote
 
John W. Vinson
Guest
Posts: n/a
 
      20th Apr 2009
On Mon, 20 Apr 2009 03:14:04 -0700, Wayne-I-M
<(E-Mail Removed)> wrote:

>Simpler method
>
>=Format(Date(),"DD/MM/YY") & " " & Format(Now(),"h:nn AM/PM")


Simpler yet: control source of Now() (which DOES return both date and time);
set the Format property of the report textbox to

"dd/mm/yy hh:nn AM/PM"

or whatever format you find appropriate.
--

John W. Vinson [MVP]
 
Reply With Quote
 
Ken Sheridan
Guest
Posts: n/a
 
      20th Apr 2009
Wayne:

I was about to take you to task for not suggesting:

=Format(Now(),"dd/mm/yyyy hh:nn AM/PM)

but by a curious piece of serendipity you've pointed me to a solution to a
little problem I've been mulling over for a few days.

I'm currently helping out a friend in California with an application for a
company there. This includes a couple of combo boxes of date/time values
which they want in the format 'mm/dd/yyyy hh:nn AM/PM', defaulting to the
current date/time. Now, while this is being done for their local office the
company is an international one, which I know trades here in the UK too, so I
can't rule out the possibility of the application being used this side of the
pond. Normally I'd try and format date values using "Short Date", "Long
Date", whatever, so that they are shown in the correct local format, but the
format they want can't be done by formatting the value all in one, but at the
same time automatically adjusting to the local format if used over here.

By formatting the date and time separately, as you suggested, this of course
enables me to use:

' requery date combo box to show dates of
' price lists prepared for selected customer
' and show current date/time as default for new price list
Me.cboDateTime.Requery
Me.cboDateTime = Format(VBA.Date, "Short Date") & Format(VBA.Now, "
hh:nn AM/PM")

Similarly in the query for the control's RowSource property I can return the
date/time values from the table formatted in the same way:

SELECT DISTINCT Format(DateTimePrepared,"Short Date") &
Format(DateTimePrepared," hh:nn AM/PM"), DateTimePrepared
FROM CustomerPricings
WHERE CustomerID = Form!cboCustomer))
ORDER BY DateTimePrepared DESC;

I can see this being useful on many occasions. So, instead of chastising
you I owe you a pint!

BTW, during your current sojourn in foreign parts shouldn't you now be
Wayne-I-T, though I suppose in Italian it should be Wayne-A-T?

Ken Sheridan
Stafford, England

"Wayne-I-M" wrote:

> Simpler method
>
> =Format(Date(),"DD/MM/YY") & " " & Format(Now(),"h:nn AM/PM")
>
>
> --
> Wayne
> Trentino, Italia.
>
>
>
> "Wayne-I-M" wrote:
>
> > Change the format to Medium Time
> >
> >
> > --
> > Wayne
> > Trentino, Italia.
> >
> >
> >
> > "mark909" wrote:
> >
> > > Thanks Wayne thats great.
> > >
> > > For:
> > >
> > > =Date() &" "&Time()
> > >
> > > How do I get Time() to display if the time is am or pm??
> > >
> > >
> > >
> > > "Wayne-I-M" wrote:
> > >
> > > > Hi Mark
> > > >
> > > > There are lots of ways
> > > > =Date() &" "&Time()
> > > >
> > > > or
> > > >
> > > > ="This report was produced on " & Format(Date(),"DDD MMM YYYY") & " at " &
> > > > Format(Now(),"h:nn AM/PM")
> > > >
> > > > etc
> > > > etc
> > > > etc
> > > >
> > > > Hope this helps
> > > >
> > > > --
> > > > Wayne
> > > > Trentino, Italia.
> > > >
> > > >
> > > >
> > > > "mark909" wrote:
> > > >
> > > > > =NOW() function returns the current date when you create a report.
> > > > >
> > > > > How do I set up this function to return the time the report was created as
> > > > > well as the date?
> > > > >
> > > > > Thanks for help


 
Reply With Quote
 
Wayne-I-M
Guest
Posts: n/a
 
      21st Apr 2009
I will revert back to being Wayne-I-M on May 1st, then back to Wayne-I-T
again in December.
If I were to be, as you suggest, Wayne-A-T then I would be an "of" and not
an "in".

:-)

--
Wayne
Trentino, Italia - but not for long



"Ken Sheridan" wrote:
>
> BTW, during your current sojourn in foreign parts shouldn't you now be
> Wayne-I-T, though I suppose in Italian it should be Wayne-A-T?
>
> Ken Sheridan
> Stafford, England


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Displaying data in a report footer on every page =?Utf-8?B?a2FiYWxh?= Microsoft Access Reports 3 24th May 2007 07:29 PM
Printing at botton of page not page footer or report footer Maureen227 Microsoft Access Reports 0 14th Aug 2006 04:12 AM
subreport in report footer has no data, showing blank page at the end of the report FA Microsoft Access Reports 1 16th May 2006 09:16 PM
Adding data to Page Footer Jim Richards Microsoft Access Reports 3 29th Apr 2005 06:12 PM
Access 2003 Report: Page Footer has data from next record Jim Brownson Microsoft Access Reports 1 20th Feb 2004 05:45 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:55 AM.