FormatDateTime Question In Outlook

S

srm

I'm using O2003. I have the following script that returns the
following values: day of week and date in long format

"Wednesday, June 08, 2005"

Sub ShowDate()
Item.Body = FormatDateTime(Date, vblongdate) & " - "
End Sub

Sub CommandButton1_Click()
Call ShowDate()
End Sub

Is there a way to format the date so it only displays: "June 08, 2005"

thanks

srm
 
G

Guest

Try this:
I commented out the second line and inserted the MsgBox to demonstrate.
Sub ShowDate()
' Item.Body = Format(Date, "mmmm dd, yyyy") & " - "
MsgBox = Format(Date, "mmmm dd, yyyy") & " - "
End Sub
Mark
 
S

srm

Mark:


Thanks, but it seems the Format command doesn't work in the Script
Editor. I get a type mismatch.

Any ideas.

Shawn
 

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