Inserting static date AND time

  • Thread starter Thread starter Barb Reinhardt
  • Start date Start date
B

Barb Reinhardt

I've found that you can insert either a static date using
[Ctrl] + [:;]
or a static time using
[Ctrl] + [Shift] + [:;]

Is there a way to enter a static date and time without adding the two
together?

Thanks in advance,

Barb Reinhardt
 
Hi, I'm not sure if this is what you are looking for, but playing
around with your example I found that you can combine them.
Add the date, press the spacebar, and then add the time--Excel
recognizes this as a date / time value.
HTH--Lonnie M.
 
Barb

Macro OK?

Sub NOWTIME()
ActiveCell.Value = Format(Now(), "dd-mm-yyyy h:mm:ss AM/PM")
End Sub

Assign to a button or shortcut key combo.

Gord Dibben Excel MVP
 
Thanks! I knew about the NOW function, but didn't want to fool around with
a copy/paste special to get the value.

Gord Dibben said:
Barb

Macro OK?

Sub NOWTIME()
ActiveCell.Value = Format(Now(), "dd-mm-yyyy h:mm:ss AM/PM")
End Sub

Assign to a button or shortcut key combo.

Gord Dibben Excel MVP

I've found that you can insert either a static date using
[Ctrl] + [:;]
or a static time using
[Ctrl] + [Shift] + [:;]

Is there a way to enter a static date and time without adding the two
together?

Thanks in advance,

Barb Reinhardt
 
Hey, I was just playing with Barb's example. I thought it was pretty
cool too. I hadn't seen that before.
 
if you're using this Excel BS, eventually you're going to copy and paste..
and you'll have to deal with that type of stuff

Move to Access, it is time to grow up




Barb Reinhardt said:
Thanks! I knew about the NOW function, but didn't want to fool around with
a copy/paste special to get the value.

Gord Dibben said:
Barb

Macro OK?

Sub NOWTIME()
ActiveCell.Value = Format(Now(), "dd-mm-yyyy h:mm:ss AM/PM")
End Sub

Assign to a button or shortcut key combo.

Gord Dibben Excel MVP

I've found that you can insert either a static date using
[Ctrl] + [:;]
or a static time using
[Ctrl] + [Shift] + [:;]

Is there a way to enter a static date and time without adding the two
together?

Thanks in advance,

Barb Reinhardt
 
Back
Top