Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 104
Default Placing time with date

Oh Wise Ones,
We have a disposition file that records a date the
entry was made among other things. I would like to add the time to that
stamp. I know this is simple for you programmers but I need help with the
syntax.

Current code:

Worksheets("Open Red Tags").Range("J4") = Date

I would like to add the date AND time to J4, but preferably keep the
formatting to display only the date (M/D/YYYY) . Could someone please help?

Thanks,
Mike
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 523
Default Placing time with date


Worksheets("Open Red Tags").Range("J4")=format(now(),"MM/DD/YYYY")

"Mike K" wrote:

Oh Wise Ones,
We have a disposition file that records a date the
entry was made among other things. I would like to add the time to that
stamp. I know this is simple for you programmers but I need help with the
syntax.

Current code:

Worksheets("Open Red Tags").Range("J4") = Date

I would like to add the date AND time to J4, but preferably keep the
formatting to display only the date (M/D/YYYY) . Could someone please help?

Thanks,
Mike

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 772
Default Placing time with date

instead of =Date, see if =Now() works for you.
--
-John
Please rate when your question is answered to help us and others know what
is helpful.


"Mike K" wrote:

Oh Wise Ones,
We have a disposition file that records a date the
entry was made among other things. I would like to add the time to that
stamp. I know this is simple for you programmers but I need help with the
syntax.

Current code:

Worksheets("Open Red Tags").Range("J4") = Date

I would like to add the date AND time to J4, but preferably keep the
formatting to display only the date (M/D/YYYY) . Could someone please help?

Thanks,
Mike

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 523
Default Placing time with date

Actually you need

with range("J4")
.value = now()
.numberformat="MM/DD/YYYY"
end with

"Sam Wilson" wrote:


Worksheets("Open Red Tags").Range("J4")=format(now(),"MM/DD/YYYY")

"Mike K" wrote:

Oh Wise Ones,
We have a disposition file that records a date the
entry was made among other things. I would like to add the time to that
stamp. I know this is simple for you programmers but I need help with the
syntax.

Current code:

Worksheets("Open Red Tags").Range("J4") = Date

I would like to add the date AND time to J4, but preferably keep the
formatting to display only the date (M/D/YYYY) . Could someone please help?

Thanks,
Mike

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 130
Default Placing time with date

Mike k,

= Format(Date, "ddddd") & " " & Format(Time, "ttttt")

"Mike K" wrote:

Oh Wise Ones,
We have a disposition file that records a date the
entry was made among other things. I would like to add the time to that
stamp. I know this is simple for you programmers but I need help with the
syntax.

Current code:

Worksheets("Open Red Tags").Range("J4") = Date

I would like to add the date AND time to J4, but preferably keep the
formatting to display only the date (M/D/YYYY) . Could someone please help?

Thanks,
Mike



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 104
Default Placing time with date

Sam,
Pardon my ignorance but how do I place this to refer to the proper
sheet?
The previous line is:

Worksheets("Red Tag").Range("H20,H46") = Date

which is ok, but then I need to refer to another sheet

Worksheets("Open Red Tags").Range ("J4")= Date

and replace it with this:

Worksheets ("Open Red Tags")
With Range("J4")
.Value = Now()
.NumberFormat = "MM/DD/YYYY"
End With

I get an invalid use of property error.

Mike

"Sam Wilson" wrote:

Actually you need

with range("J4")
.value = now()
.numberformat="MM/DD/YYYY"
end with

"Sam Wilson" wrote:


Worksheets("Open Red Tags").Range("J4")=format(now(),"MM/DD/YYYY")

"Mike K" wrote:

Oh Wise Ones,
We have a disposition file that records a date the
entry was made among other things. I would like to add the time to that
stamp. I know this is simple for you programmers but I need help with the
syntax.

Current code:

Worksheets("Open Red Tags").Range("J4") = Date

I would like to add the date AND time to J4, but preferably keep the
formatting to display only the date (M/D/YYYY) . Could someone please help?

Thanks,
Mike

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 523
Default Placing time with date


Sorry, use this:

With worksheets("Open Red Tags").Range("J4")
.Value = Now()
.NumberFormat = "MM/DD/YYYY"
End With

"Mike K" wrote:

Sam,
Pardon my ignorance but how do I place this to refer to the proper
sheet?
The previous line is:

Worksheets("Red Tag").Range("H20,H46") = Date

which is ok, but then I need to refer to another sheet

Worksheets("Open Red Tags").Range ("J4")= Date

and replace it with this:

Worksheets ("Open Red Tags")
With Range("J4")
.Value = Now()
.NumberFormat = "MM/DD/YYYY"
End With

I get an invalid use of property error.

Mike

"Sam Wilson" wrote:

Actually you need

with range("J4")
.value = now()
.numberformat="MM/DD/YYYY"
end with

"Sam Wilson" wrote:


Worksheets("Open Red Tags").Range("J4")=format(now(),"MM/DD/YYYY")

"Mike K" wrote:

Oh Wise Ones,
We have a disposition file that records a date the
entry was made among other things. I would like to add the time to that
stamp. I know this is simple for you programmers but I need help with the
syntax.

Current code:

Worksheets("Open Red Tags").Range("J4") = Date

I would like to add the date AND time to J4, but preferably keep the
formatting to display only the date (M/D/YYYY) . Could someone please help?

Thanks,
Mike

  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 104
Default Placing time with date

Beautiful!!

Thanks Sam

"Sam Wilson" wrote:


Sorry, use this:

With worksheets("Open Red Tags").Range("J4")
.Value = Now()
.NumberFormat = "MM/DD/YYYY"
End With

"Mike K" wrote:

Sam,
Pardon my ignorance but how do I place this to refer to the proper
sheet?
The previous line is:

Worksheets("Red Tag").Range("H20,H46") = Date

which is ok, but then I need to refer to another sheet

Worksheets("Open Red Tags").Range ("J4")= Date

and replace it with this:

Worksheets ("Open Red Tags")
With Range("J4")
.Value = Now()
.NumberFormat = "MM/DD/YYYY"
End With

I get an invalid use of property error.

Mike

"Sam Wilson" wrote:

Actually you need

with range("J4")
.value = now()
.numberformat="MM/DD/YYYY"
end with

"Sam Wilson" wrote:


Worksheets("Open Red Tags").Range("J4")=format(now(),"MM/DD/YYYY")

"Mike K" wrote:

Oh Wise Ones,
We have a disposition file that records a date the
entry was made among other things. I would like to add the time to that
stamp. I know this is simple for you programmers but I need help with the
syntax.

Current code:

Worksheets("Open Red Tags").Range("J4") = Date

I would like to add the date AND time to J4, but preferably keep the
formatting to display only the date (M/D/YYYY) . Could someone please help?

Thanks,
Mike

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
Converting text format of time/date into Excel time/date for subtr YY san.[_2_] Excel Worksheet Functions 6 February 25th 10 08:27 AM
Calculating date and placing the value in the right date range col GeorgeL Excel Discussion (Misc queries) 2 July 2nd 09 03:22 AM
Calculating days & time left from start date/time to end date/time marie Excel Worksheet Functions 7 December 7th 05 02:36 PM
Combined date time cell to separate date & time components Mark Ada Excel Discussion (Misc queries) 1 December 2nd 04 12:07 AM
Combined date time cell to separate date & time components Mark Ada Excel Worksheet Functions 1 December 2nd 04 12:04 AM


All times are GMT +1. The time now is 08:36 AM.

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

About Us

"It's about Microsoft Excel"