PARSE DATE FIELD

V

Vicki-S

I have a report where I am currently inputting the current date into the
source query so I can set the date in the report caption:

Me.Caption = ReptDate & " Weekly Status Report - Case Nbr " & [Project #]

Is there a way to parse NOW() so instead of having to input the ReptDate it
would format the current date in YYYYMMDD format? I've tried setting
ReptDate to NOW() with a short date format - and that's how it's reflected on
the query - but when I try to parse it I keep getting the time in the RIGHT
section of the parse.

Almost everything I've learned about Access past the basics I've learned
through the discussion groups so I'm sorta self-educated. Any suggestions
will be appreciated. I'm using Access 2002-2003. Thanks in advance for your
help.
 
V

Vicki-S

Like I said, I'm not that swift at this yet. Field ReptDate referenced in
the Me!Caption below is a field I added to the query (completed by the user
from a pop-up) but I want to just always use the current date in the format
of YYYYMMDD (instead of the pop-up). Where does the Format(Date()),
"yyyymmdd") need to be put? In the query? In the Event Procedure? I've
tried putting it into the query but if that's the place I must not understand
what you're saying. Please provide more information.

Allen Browne said:
Try:
Format(Date()), "yyyymmdd")

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.


Vicki-S said:
I have a report where I am currently inputting the current date into the
source query so I can set the date in the report caption:

Me.Caption = ReptDate & " Weekly Status Report - Case Nbr " & [Project #]

Is there a way to parse NOW() so instead of having to input the ReptDate
it
would format the current date in YYYYMMDD format? I've tried setting
ReptDate to NOW() with a short date format - and that's how it's reflected
on
the query - but when I try to parse it I keep getting the time in the
RIGHT
section of the parse.

Almost everything I've learned about Access past the basics I've learned
through the discussion groups so I'm sorta self-educated. Any suggestions
will be appreciated. I'm using Access 2002-2003. Thanks in advance for
your
help.
 
V

Vicki-S

In other words, what I want to do is take today's date and format it into
YYYYMMDD format (either in the query or report) so I can put this as part of
the Me!Caption. I need to know what I have to do - and where I have to do
it. Thanks again for your help.

Allen Browne said:
Try:
Format(Date()), "yyyymmdd")

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.


Vicki-S said:
I have a report where I am currently inputting the current date into the
source query so I can set the date in the report caption:

Me.Caption = ReptDate & " Weekly Status Report - Case Nbr " & [Project #]

Is there a way to parse NOW() so instead of having to input the ReptDate
it
would format the current date in YYYYMMDD format? I've tried setting
ReptDate to NOW() with a short date format - and that's how it's reflected
on
the query - but when I try to parse it I keep getting the time in the
RIGHT
section of the parse.

Almost everything I've learned about Access past the basics I've learned
through the discussion groups so I'm sorta self-educated. Any suggestions
will be appreciated. I'm using Access 2002-2003. Thanks in advance for
your
help.
 
J

John W. Vinson

In other words, what I want to do is take today's date and format it into
YYYYMMDD format (either in the query or report) so I can put this as part of
the Me!Caption. I need to know what I have to do - and where I have to do
it. Thanks again for your help.

Put a textbox on the Report with a control source

=Format(Date()), "yyyymmdd")

or just use a control source of =Date() and set its Format property to
yyyymmdd.
 
V

Vicki-S

Thanks, John - I used the textbox and itt works like a charm (although there
was an extra ')' in your example, I was at least able to figure THAT out).
You people are great to work with!!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top