Date Difficulties!

dodie

New member
Local time
Today, 11:59
Joined
Oct 19, 2009
Messages
9
Hi Everyone,

Just a short one. I have Multiple Date Fields on a Report that I would like to be formatted as a long date but without the year. Can anyone help?

Therefore; Monday, 14th of December.

Not; Monday 14th of December 2009.

Thankyou in advance.
 
You can do it as such

Format([YourDate],"dddd, dd mmmm")

The only bit it does not provide is the nd,st,rd,th etc.

If you want this you would have to write a function to retreive this.

David
 
Just take away the year...
Left ( format(Yourdate , "long date"), len(format(Yourdate , "long date")) -5 )
 
Why not just set the Format display property of the textbox to
dddd mmmm d
no need for Format Functions?
 
Thankyou all for taking the time to answer, I'm not sure if I'm doing something wrong but when I used your SQL Statements they came up with 'Error#' in the box I'm trying to format.

Let's say the field's name is [InstanceDate1].

I have used your suggestions in the Control Source property like so:

- Format([InstanceDate1],"dddd, dd mmmm")

- Left(Format([InstanceDate1], "Long date"), Len(Format([InstanceDate1], "Long date"))-5)

And for your suggestion Rich I was unsure where you put 'dddd mmmm d'?
 
Hi -

Try playing with this. Example from the debug (immediate) window:

Code:
? format(date(), "dddd") & ", " & day(date())& Nz(Choose(IIf(day(date()) < 21, day(date()), day(Date()) Mod 10), "st", "nd", "rd"), "th") & " of " & format(date(), "mmmm")
Tuesday, 15th of December

Realize it's a tad long, but it does return what you indicated.

HTH - Bob
 
?Left(Format(Date(), "Long date"), Len(Format(Date(), "Long date"))-6)
Wednesday, December 16

works fine, though rich' answer is probably the best putting the format in the control box.
Only potential problem with that might be re-usability, how things "need" to look seems to change from time to time. I find it easier to have these formats stored in public places rather than specific controls of reports or forms.
 
Won't the Left function etc create problems though with the dreaded Missing Reference problem?
 
yes missing reference could be (one of) the reason(s) why it would fail
 

Users who are viewing this thread

Back
Top Bottom