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?action=getinfo&userid=26092
View this thread: http://www.excelforum.com/showthread.php?threadid=394484

0
8/10/2005 6:13:20 AM
excel.misc 78881 articles. 5 followers. Follow

4 Replies
400 Views

Similar Articles

[PageSpeed] 15

How about ="String"&Text(Now(),"d/m/yyyy hh:mm")
Rgds,
ScottO

"kizzie" <kizzie.1tje2f_1123657509.5167@excelforum-nospam.com> wrote
in message
news:kizzie.1tje2f_1123657509.5167@excelforum-nospam.com...
|
| 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
|


0
8/10/2005 7:23:19 AM
If you mean VBA instaed, that is

myVar = "String" & Format(Now,"dd/mm/yyyy hh:mm:ss")

-- 
 HTH

Bob Phillips

"ScottO" <scott_orchard_REMOVETHIS@hotmail.comTHISTOO> wrote in message
news:e1WPlxXnFHA.2916@TK2MSFTNGP14.phx.gbl...
> How about ="String"&Text(Now(),"d/m/yyyy hh:mm")
> Rgds,
> ScottO
>
> "kizzie" <kizzie.1tje2f_1123657509.5167@excelforum-nospam.com> wrote
> in message
> news:kizzie.1tje2f_1123657509.5167@excelforum-nospam.com...
> |
> | 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
> |
>
>


0
bob.phillips1 (6510)
8/10/2005 7:48:11 AM
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?action=getinfo&userid=18932
View this thread: http://www.excelforum.com/showthread.php?threadid=394484

0
8/10/2005 7:53:36 AM
thx , that did the job :

--
kizzi
-----------------------------------------------------------------------
kizzie's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=2609
View this thread: http://www.excelforum.com/showthread.php?threadid=39448

0
8/10/2005 9:43:18 AM
Reply:

Similar Artilces:

Lost all my Outlook data after a certain date....HELP!
Outlook 2000 has screwed me over big-time! I seem to have lost all my Outlook data for the past 6 months - email, contacts, calendar, etc. All the data prior to 6 mos. ago has been retained. Right before this data loss, I was having strange PC behavior - most likely due to spyware apps that were slowing down performance. I looked at my Outlook PST file and it appears the same size as it was before the data loss, so this missing data should still be in there somewhere? I have tried to export the PST file to different formats, such as Access and tab-separated values, but to no avail. I thi...

Date Function
Today when I open my database appears a message notifying that a not recognized function was on my Form, yesterday it work properly, I referred for some controls the Date() Function and now I had to change it for Now() Function in order to my form works, Do anybody have a clue on what happened??? Im using MS access 2003 and Windows XP Professional,please help!. Thanxs in advance!!. Anytime an application that previously worked stops working, or an application that works on one machine won't work on another machine, the first thing to check is the References collection. (All Access...

extract the month of a date
I want to extract the month of a date. for example I have dat "6/5/2005" which is in "mm/dd/yyyy" format. i want to get the mont part of the date as "Jun". Similarly for the date "8/12/2005" a "Aug". Presently I am doing this with the help of VLOOKUP approach with table having these values. As i am having a huge volume of data to work with a quicker and easie formula can be a great help. Thank you -- girees ----------------------------------------------------------------------- gireesh's Profile: http://www.excelforum.com/member.php?a...

PV, unequal pymts, different dates
Excel 2003. Is ther a formula/template of calculating the Present Value of a series of UNequal payments made at differing dates. Thanks, jcs Look at the XNPV() function. If you get a #NAME error: Tools>Add-ins, check Analysis Toolpak -- Kind regards, Niek Otten Microsoft MVP - Excel "Craig" <jcstone@mindspring.com> wrote in message news:nO2dndH9uodzFRLVnZ2dnUVZ_tHinZ2d@earthlink.com... | Excel 2003. Is ther a formula/template of calculating the Present Value of a | series of UNequal payments made at differing dates. Thanks, jcs | | Thanks, works great. What abou...

sum function not actually summing??????
Excel 03 OK, I'm trying to sum numbers a column. This is exact representation, cells F19 to F22: $11,087 $3,400 $2,400 $1,211 I sum into F23 and get the result of only F19 *$11,087.* F23 cell formula shows as =SUM(F19:F22) This is a sheet I downloaded. I added a row (F21) to insert the $2400. When first sum action didn't work, I thought maybe it was based on cell format, so I reformatted to label them currency (this shows in cell properties), so it's not an issue of cell format standardization. Also, I copied the numbers from F column to a new one and pasted as ...

Counting Dates of Occurrences
I am developing a spreadsheet to show the date and time an event has occurred at a location. The cells indicating date and time are custom formated to display mm/dd hh:mm. The first occcrrence is shown in column G, the second occurence in column H, the third iin column I, and so on. This works fine, but I need to count the number of occurrences shown in each column. Can you help? Thanks =COUNT(A2:A200) assuming you are using excel dates and times -- Regards, Peo Sjoblom "wally" <wally@discussions.microsoft.com> wrote in message news:6EEBFCEB-6FAC-40F2-B8B7-04...

Excel 2003 - VBA
Guys, Is there a real quick way to simply add 1 month to a date. eg: Jan. 13,2008 + 1 month = Feb. 13, 2006 or Feb. 13, 2008 + 1 Month = Mar. 13, 2008. Craig What if the date is January 30th? =DATE(YEAR(D9),MONTH(D9)+1,DAY(D9)) with your date in D9 -- Regards, Peo Sjoblom "Craig Brandt" <brandtcraig@att.net> wrote in message news:Pvo1k.6233$mh5.1489@nlpi067.nbdc.sbc.com... > Guys, > > Is there a real quick way to simply add 1 month to a date. > eg: Jan. 13,2008 + 1 month = Feb. 13, 2006 or Feb. 13, 2008 + 1 Month = > Mar. > 13, 2008. > &g...

Macro giving different results each time it is run
Hi there, A month or so ago I created a macro by recording and saved it and have been using it well. Until recently the results have been incorrect. part of the macro is sorting the different products into groups and for some reason it is doing this incorrectly. Every time I run the macro the sorting results are different from the previous run and the information on the sorting is the same always. Any ideas ?? -- Niall Niall, recorded macros are just a starting point. They often refer to the wrong ranges when you want to run them on a different data set. Sometimes they are set ...

advanced filter date criteria
Hi My advanced filter works manually but not in macro > It is a criteria issue as column headings work I am trying to filter data where ship date is <= todays date +28 Columns("g:k").AdvancedFilter Action:=xlFilterCopy, CriteriaRange:=Range( _ "m1:m2"), CopyToRange:=Range("p1" _ ), Unique:=False where m1 = ShipDate and m2 = <=15/03/2010 this works manually but not in macro but if replace m2 with a date it works therefore how do i write for less than and equal to Thank you Tina Hi I worked out date has to be mm/dd/yy form...

Formula to get date from text string
This is what the cell currently looks like: [10/01/09 11:30PM] I would like the formula to return only: 10/01/09 Does anyone know what formula I should use? Any help would be greatly appreciated. Thanks!! Sara Here's one way: =3D--MID(A1,2,8) though this will only work if the date is in the normal format for your region (does it mean 10th January 2009, or 1st October 2009 ?). A safer way might be: =3DDATE(2000+MID(A1,8,2),MID(A1,5,2),MID(A1,2,2)) or: =3DDATE(2000+MID(A1,8,2),MID(A1,2,2),MID(A1,5,2)) depending on the answer to my earlier question. ...

Date Sort
How do you sort a list of birth dates so that they are in order for the year, this would be for a birthday list for staff. The format of the data is dd:mm:yy. Whatever the format is, any dates (with times) will be sorted with the order of year, month, day(, hour, minute, second). Why don't you try first before asking? Did you have any problem? -- Mike Ref to "kuri" <kurios@freenet.co.uk> wrote in message news:0a6a01c345fa$c12f7800$a301280a@phx.gbl... "kuri" <kurios@freenet.co.uk> wrote in message news:0a6a01c345fa$c12f7800$a301280a@phx.gbl... > How ...

Date keeps altering when Excel opens.
I set the date using the date formula , clicking today.... fine. When I open worksheet I find the date changes to the date I am opening it ratrher then keeping the entry date. I must have accidentally switched something on but can't see what. "Chubby" <notageek@msn.com> wrote in message news:q52aovomso1i57j1pc0c9vrd9k0attg7sp@4ax.com... > I set the date using the date formula , clicking today.... fine. > > When I open worksheet I find the date changes to the date I am opening > it ratrher then keeping the entry date. > > I must have accidentally switch...

Getting system date
Hello, I was wondering if there was any MFC function which I can call that can get the year, can get the month, and can get the day from the system. Sincerely, James Simpson Straightway Technologies How about: // Convert CTime to FILETIME CTime time(CTime::GetCurrentTime()); SYSTEMTIME timeDest; time.GetAsSystemTime(timeDest); FILETIME fileTime; ::SystemTimeToFileTime(&timeDest, &fileTime); -johnny"James Simpson" <anonymous@discussions.microsoft.com> wrote in message news:03f701c3cba4$6d63fbd0$a301280a@phx.gbl... > Hello, > I was wondering if there was...

email dates missing after import from Outlook Express
I imported my email from Outlook Express to Outlook. All of the messages imported properly, but the view of them is missing the creation date on all over about 6 months old. When I open the mail, the date is available, but only if I open it. What went wrong & how can I get Outlook to display the message date? Thanks! Don S Sorry, the missing date is the "received" date. The view displays "none". It does display the file size. Don S On Sat, 19 Aug 2006 14:47:19 GMT, Don S <donswin+news@gmail.com> wrote: >I imported my email from Outlook Express to Out...

Problem with Date Formatting
I am importing a text file with dates in the format 3/1/05. I need the data formatted as DD-MMM-YYYY. I can get this for all dates EXCEPT where the leading zero has been dropped off the day, such as 3/1/05. Can anyone suggest how to do this in Excel? ...

outlook timing out to server
I set up my dad's new Dell with outlook for email. Everything was working fine. I did the service updates that Microsoft recommended and now I cannt send or get email. It never connects to the server. Any help is apprecaited. My ISP was stumped and could not figure it out. dialup or broadband (cable/dsl)? if broadband, are you behind a router that lets you share a single ip address? -- Due to the Swen virus, all e-mails sent to this account will be deleted w/out reading. "egriffit@prodigy.net" <anonymous@discussions.microsoft.com> wrote in message news:03bd01c...

count days in a date range
I am trying to count the number of days within a given date range but leave out saturday's and Sunday's. Is there a way to do this? Using the function Days360 seems to be the right path, and counts all the days between the range, but I am not sure how to customize from there, if it is even possible. cp Hi if your dates are in a and B1 use =NETWORKDAYS(A1,B1,list_of_holidays) Note: the Analysis Toolpak Add-in has to be installed for this -- Regards Frank Kabel Frankfurt, Germany cp wrote: > I am trying to count the number of days within a given > date range but leav...

AfxBeginThread startup times and overhead
I'm trying to get a rough idea of the amount of overhead involved with AfxBeginThread. On a 550-MHz Pentium, with not much else going on (i.e. the performance meter shows less than 10 percent CPU utilization), on average how long should it take for AfxBeginThread to execute and create the thread? Is it more like tens or low hundreds of microseconds, or more like milliseconds? I'm working on a program that creates four threads and it seems to take longer to create them than I expected. Thanks.... A. J. Rappaport wrote: > I'm trying to get a rough idea of the amount of ove...

How to report on tot. Discount/Savings for date ranges?
Hello. I'm in need of some advice from some of you reporting guru's...here's the scenario: My client needs to have the total of all discounts given to their customers for their fiscal year in order to write-off this cumulative amount as "marketing / advertising" expenses, etc. The only way to access this data however (from what I can see) is from the Savings field -- only problem is that this is attached to part of the customer history and is not selectable in terms of date ranges (to isolate FY 05)...it's all or nothing. So short of dumping all of the cus...

Automatic date insertion
Version: 2008 Operating System: Mac OS X 10.6 (Snow Leopard) Processor: Intel I know I've done this before but I just can't remember how. I've tried every option I can think of and searched the archives but still can't do it. <br><br>I want the current day's date to always appear on a document, preferably in the bottom right. I don't want to add this to the Normal Template as I don't add the date to all documents. <br><br>Thanks so much for refreshing my faulty memory. <br><br>Sheri Hi Sheri: Inset>Field>Date... ...

Run-time Error 91- What does this mean?
VISIO Std 2003 SP2 I am getting this error when I open a Visio file. What does it mean? I don't have any kind of Add-In that I know of. --------------------------- MyAddIn --------------------------- Run-time error '91': Object variable or With block variable not set --------------------------- OK --------------------------- dbuchanan Hi DB, Somebody has likely sent you a document with VBA (visual basic) code in it. Hit Alt + F11 to get the VBA editor. View > Project Explorer to see the files in the code project. Dig around in the files, and delete all the code (if...

Smartlist is opening excel multiple times in version 9
In version 8, you export a couple things from Smarlist, it created multiple workbooks within the same sheet, so that you could flip between them by clicking on Window. In version 9, it seems to create mutliple worksheets and also seems to open excel multiple times, so we cannot flip between them. We are using Citrix. ...

Forcing 2 digits for month in Date
I have downloaded data which contains a column of review dates. The dates are formatted as mm/dd/yyyy. I have code that expects the date to always be 8 digits (and apparently text) in the form of, "05152004". The current code treats the month segment as =If(Left(A1,2)="05", Then do something... which currently fails for months 1 thru 9. I know I could do; =If(Month(A1)=5, etc. but this would involve finding and replacing every instance of date-handling code. I was hoping that I could perform a one-time vba procedure on the date column such that the stored month segment was ...

Time out of sync on domain computers
On quite a few of our Vista domain machines we are noticing that at a certain random point, time on the taskbar just stops. I can only assume that its something on our SBS2008 server as it is happening on multiple machines. How can I get this fixed? Am I understanding you correctly that the clock on the Vista taskbar just stops at a certain time? So for example it keeps good time until 3:14 and then just stays at 3:14? If that's the case, I'd be surprised if it's related to the SBS. Open a cmd prompt on a machine where the time is stopped. Type "net time ...

Time Format #9
Hello all Probably missing something, but I can't seem to find anything on a time format I want to use. I want to enter some times in the format of Minutes: Seconds : Hundreds of a second. Will Excel accdept hundredths of a second, & if so, what format do I use. Additionally, I don't particularly want to enter hours. It is for swimming times over small distances (50 & 100 Metres etc) I can't find any mention in the help files. Thanks Tony McGee Tony, Use a custom format of mm:ss.000 -- HTH RP "Tony McGee" <tony@tmsoft.com.au> wrote in mess...