#1   Report Post  
kizzie
 
Posts: n/a
Default 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

  #2   Report Post  
ScottO
 
Posts: n/a
Default

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
|


  #3   Report Post  
Bob Phillips
 
Posts: n/a
Default

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
|




  #4   Report Post  
kizzie
 
Posts: n/a
Default


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

  #5   Report Post  
dominicb
 
Posts: n/a
Default


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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using VLOOKUP with a Date and Time Charles Excel Discussion (Misc queries) 4 September 20th 05 06:38 PM
Imported Date & Time format with calcs. managed in excel from imrp Todd F. Excel Worksheet Functions 0 July 8th 05 09:03 PM
Automatically enter date and time but only update once. PM New Users to Excel 3 January 21st 05 07:47 AM
Help - Information with time and date PM Excel Discussion (Misc queries) 4 January 6th 05 08:25 AM
Combined date time cell to separate date & time components Mark Ada Excel Discussion (Misc queries) 1 December 2nd 04 12:07 AM


All times are GMT +1. The time now is 04:44 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"