![]() |
actual time and date
Hello, Does anyone know the command for adding the actual time and date to a string? thx in advance -- kizzie ------------------------------------------------------------------------ kizzie's Profile: http://www.excelforum.com/member.php...o&userid=26092 View this thread: http://www.excelforum.com/showthread...hreadid=394484 |
How about ="String"&Text(Now(),"d/m/yyyy hh:mm")
Rgds, ScottO "kizzie" wrote in message ... | | Hello, | | Does anyone know the command for adding the actual time and date to a | string? | | thx in advance | | | -- | kizzie | ------------------------------------------------------------------- ----- | kizzie's Profile: http://www.excelforum.com/member.php...o&userid=26092 | View this thread: http://www.excelforum.com/showthread...hreadid=394484 | |
If you mean VBA instaed, that is
myVar = "String" & Format(Now,"dd/mm/yyyy hh:mm:ss") -- HTH Bob Phillips "ScottO" wrote in message ... How about ="String"&Text(Now(),"d/m/yyyy hh:mm") Rgds, ScottO "kizzie" wrote in message ... | | Hello, | | Does anyone know the command for adding the actual time and date to a | string? | | thx in advance | | | -- | kizzie | ------------------------------------------------------------------- ----- | kizzie's Profile: http://www.excelforum.com/member.php...o&userid=26092 | View this thread: http://www.excelforum.com/showthread...hreadid=394484 | |
Good morning Kizzie Do you mean within VBA? The code below will add the time in a prescribed format to a text string, a. Sub test() a = "The time is " & Format(Now(), "hh:mm:ss") MsgBox a End Sub HTH DominicB -- dominicb ------------------------------------------------------------------------ dominicb's Profile: http://www.excelforum.com/member.php...o&userid=18932 View this thread: http://www.excelforum.com/showthread...hreadid=394484 |
thx , that did the job :) -- kizzie ------------------------------------------------------------------------ kizzie's Profile: http://www.excelforum.com/member.php...o&userid=26092 View this thread: http://www.excelforum.com/showthread...hreadid=394484 |
All times are GMT +1. The time now is 11:02 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com