ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Macro is pulling wrong date format into Email (https://www.excelbanter.com/excel-programming/418513-macro-pulling-wrong-date-format-into-email.html)

Gina_28 via OfficeKB.com

Macro is pulling wrong date format into Email
 
Hello, I have a macro that is pulling the time from a cell, into the message
body of an email in Outlook. But, it is not pulling the time...it's pulling
the raw form.

Example:
Time should be: 10:00 AM
Pulling into the message body: 0.416666666666667

Something I'm doing wrong?

Thanks

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200810/1


Gary Keramidas

Macro is pulling wrong date format into Email
 
try something like this

format(range("A1"),"hh:mmAM/PM")

--


Gary

"Gina_28 via OfficeKB.com" <u46866@uwe wrote in message
news:8bafb7f1b2679@uwe...
Hello, I have a macro that is pulling the time from a cell, into the
message
body of an email in Outlook. But, it is not pulling the time...it's
pulling
the raw form.

Example:
Time should be: 10:00 AM
Pulling into the message body: 0.416666666666667

Something I'm doing wrong?

Thanks

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200810/1





All times are GMT +1. The time now is 10:52 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com