Time format

J

Joe Wildman

Hello everyone, I am unable to get the code right
I have a cell in VBA called "date_time", it is formated to be "mm/dd/yyyy
HH:MM"

In the output email it paste into it shows the the seconds so i did some
code and was unable to get it to work in the correct format

Call Date_Time (works) but shows seconds
or
Call Date_Time .... "mm/dd/yyyy HH:MM") ...not working
 
B

Billy Liddel

Joe
Try
With Date_Time
.Value = Now()
.NumberFormat = "MM/DD/YYYY hh:mm"
End With

Regards
Peter Atherton
 

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