Time format

  • Thread starter Thread starter Joe Wildman
  • Start date Start date
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
 
Joe
Try
With Date_Time
.Value = Now()
.NumberFormat = "MM/DD/YYYY hh:mm"
End With

Regards
Peter Atherton
 
Back
Top