PC Review


Reply
Thread Tools Rate Thread

Date range in header and date format

 
 
=?Utf-8?B?UHVyZUV2aWw=?=
Guest
Posts: n/a
 
      6th Oct 2006
I've created a database to track timecards and I've run across two issues I
can't find an answer to:

How do I change the date format without using the presets. We work in
yyyy/mm/dd; also on one report I need to display mmm/dd. Neither of these
options appears in the presets.

I've added a date range requirement to a query, when the report is run the
user is prompted "start date: mm/dd/yy" then "end date: mm/dd/yy" (see above
note on changing the date format). I would like the date range selected to
appear in the report header as "Pay Period: YYYY/MM/DD to YYYY/MM/DD".
Suggestions?

Thanks!
Pamala
 
Reply With Quote
 
 
 
 
Douglas J. Steele
Guest
Posts: n/a
 
      7th Oct 2006
You type the desired format string in, rather than chosing a named format.

For the header, you'd set the control source of the text box to:

"Pay Period: " & Format([start date: mm/dd/yy], "yyyy\/mm\/dd") & " to " &
Format([end date: mm/dd/yy], "yyyy\/mm\/dd")

Note the \ in front of the / in the format statement: that guarantees you'll
get / as separators (otherwise, it'll use whatever has been defined as the
Date Separator in Regional Settings)

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


"PureEvil" <(E-Mail Removed)> wrote in message
news:AE062EE8-C09C-4320-AD2A-(E-Mail Removed)...
> I've created a database to track timecards and I've run across two issues
> I
> can't find an answer to:
>
> How do I change the date format without using the presets. We work in
> yyyy/mm/dd; also on one report I need to display mmm/dd. Neither of these
> options appears in the presets.
>
> I've added a date range requirement to a query, when the report is run the
> user is prompted "start date: mm/dd/yy" then "end date: mm/dd/yy" (see
> above
> note on changing the date format). I would like the date range selected
> to
> appear in the report header as "Pay Period: YYYY/MM/DD to YYYY/MM/DD".
> Suggestions?
>
> Thanks!
> Pamala



 
Reply With Quote
 
=?Utf-8?B?S0FSTCBERVdFWQ==?=
Guest
Posts: n/a
 
      7th Oct 2006
Use Format([YourDateField], "yyyy/mm/dd") and for report header use
"Pay Period: "& Format([YourFromDateField], "yyyy/mm/dd") & " To " &
Format([YourToDateField], "yyyy/mm/dd") in the textbox.

"PureEvil" wrote:

> I've created a database to track timecards and I've run across two issues I
> can't find an answer to:
>
> How do I change the date format without using the presets. We work in
> yyyy/mm/dd; also on one report I need to display mmm/dd. Neither of these
> options appears in the presets.
>
> I've added a date range requirement to a query, when the report is run the
> user is prompted "start date: mm/dd/yy" then "end date: mm/dd/yy" (see above
> note on changing the date format). I would like the date range selected to
> appear in the report header as "Pay Period: YYYY/MM/DD to YYYY/MM/DD".
> Suggestions?
>
> Thanks!
> Pamala

 
Reply With Quote
 
=?Utf-8?B?UHVyZUV2aWw=?=
Guest
Posts: n/a
 
      7th Oct 2006
Thanks! It worked. I didn't know that you could override the presets just by
typing - that tidbit helped with a lot of minor issues.

And the heading info worked to,

Again, thanks!

Pamala

"Douglas J. Steele" wrote:

> You type the desired format string in, rather than chosing a named format.
>
> For the header, you'd set the control source of the text box to:
>
> "Pay Period: " & Format([start date: mm/dd/yy], "yyyy\/mm\/dd") & " to " &
> Format([end date: mm/dd/yy], "yyyy\/mm\/dd")
>
> Note the \ in front of the / in the format statement: that guarantees you'll
> get / as separators (otherwise, it'll use whatever has been defined as the
> Date Separator in Regional Settings)
>
> --
> Doug Steele, Microsoft Access MVP
> http://I.Am/DougSteele
> (no private e-mails, please)
>
>
> "PureEvil" <(E-Mail Removed)> wrote in message
> news:AE062EE8-C09C-4320-AD2A-(E-Mail Removed)...
> > I've created a database to track timecards and I've run across two issues
> > I
> > can't find an answer to:
> >
> > How do I change the date format without using the presets. We work in
> > yyyy/mm/dd; also on one report I need to display mmm/dd. Neither of these
> > options appears in the presets.
> >
> > I've added a date range requirement to a query, when the report is run the
> > user is prompted "start date: mm/dd/yy" then "end date: mm/dd/yy" (see
> > above
> > note on changing the date format). I would like the date range selected
> > to
> > appear in the report header as "Pay Period: YYYY/MM/DD to YYYY/MM/DD".
> > Suggestions?
> >
> > Thanks!
> > Pamala

>
>
>

 
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
Date range in header Cheese Microsoft Access Reports 4 23rd Apr 2008 06:21 PM
Changing the date format & adding the date range to the header =?Utf-8?B?UHVyZUV2aWw=?= Microsoft Access 1 6th Oct 2006 11:31 PM
Link date to a table with Date Range (Eff Date and term date) =?Utf-8?B?S2V2aW4gUmVlZA==?= Microsoft Access 1 31st Aug 2006 04:23 PM
Trying to subtract date range using General Date format =?Utf-8?B?Y29ubmll?= Microsoft Access Form Coding 1 2nd Dec 2005 09:52 PM
Run Query from date to date, Print the from date to date in the header of the report? Dustin Swartz Microsoft Access Queries 1 25th Jan 2005 07:06 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:25 PM.