Hello, Does anyone know the command for adding the actual time and date to a string? thx in advance
K kizzie Aug 10, 2005 #1 Hello, Does anyone know the command for adding the actual time and date to a string? thx in advance
S ScottO Aug 10, 2005 #2 How about ="String"&Text(Now(),"d/m/yyyy hh:mm") Rgds, ScottO 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?action=getinfo&userid=26092 | View this thread: http://www.excelforum.com/showthread.php?threadid=394484 |
How about ="String"&Text(Now(),"d/m/yyyy hh:mm") Rgds, ScottO 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?action=getinfo&userid=26092 | View this thread: http://www.excelforum.com/showthread.php?threadid=394484 |
B Bob Phillips Aug 10, 2005 #3 If you mean VBA instaed, that is myVar = "String" & Format(Now,"dd/mm/yyyy hh:mm:ss")
D dominicb Aug 10, 2005 #4 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
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