Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Day current time for function using excel vba

searched on Google I found one. Is it possible to format time in [h]:mm format using VBA?

Dim currentTime As Date
currentTime = TimeOfDay

I passed currentTime into database when I dumped data - showing put put as 00.00.00.000000 not understood why its showing different? Is there any other function to call current time 00.00 AM/PM

like image 282
Devendar Avatar asked Jul 27 '12 09:07

Devendar


1 Answers

To format the current time to your specs try

MsgBox Format(Now(), "hh:mm AMPM")
like image 120
brettdj Avatar answered Oct 22 '22 23:10

brettdj