excel - How to add 2 different times in VBA? -


i need convert gmt utc time , add 2 different times.

here code have :

dim curdate, correction, utctime date curdate = format(datetime.now, "yyyy-mm-dd hh:mm:ss") utctime = dateadd("h", 4.5, curdate) 

however adding integer part of hours i.e., 4 , not 4.5

any idea, how achieve ?

try this

utctime = dateadd("n", 4.5 * 60, curdate) 

Comments

Popular posts from this blog

Delphi XE2 Indy10 udp client-server interchange using SendBuffer-ReceiveBuffer -

Qt ActiveX WMI QAxBase::dynamicCallHelper: ItemIndex(int): No such property in -

Enable autocomplete or intellisense in Atom editor for PHP -