Concatenate Dates

D

Dawn

Hi Folks, I have a begin date and end date in a table. In
a report if the end date is greater than the begin date I
want to display both dates but in long format for
instance: Thursday, October 24, 2003 through Friday,
October 25, 2003. I can make the IIF work and the
expression but I do not get the day of the week even
though I have long date set everywhere.
Thanks for help.
 
A

Allen Browne

If you are getting everything except the name of the weekday, open the
Windows Control Panel and check the setting for Long Date under Regional
Settings. Include dddd to get the full day name.

Alternatively, you could set the Format of your text box to:
dddd mmmm d\, yyyy
 
C

Chadlon

Dawn,

If I interpret your meaning, you are hoping that describing the report
control as Long Date will apply that format to both of the concatenated
dates.

If both dates are actually ending up in one control - else why use the term
concatenate - then Access will not see the control as dates or even a date,
but rather as a string.

To get the effect I think you want, your ControlSource could look like:
IIf([StartDate]<[EndDate],format([StartDate],"Long date")&" through
"&format([EndDate],"Long date"),"")
That will get you for example
Thursday, 23 October 2003 through Friday, 24 October 2003

If you don't use the Format function - as in [StartDate]&" through
"&[EndDate] - then Access just uses standard coercion to convert the dates
to string.

CD
 

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