![]() |
|
#1
|
|||
|
|||
![]() Code:
Sub EntryDate() Dim sDate As String, sTime As String // "DDD" only returns a small-letter weekday sDate = Format(DateValue(Now()), "yyyy-mm-dd DDD") sTime = Format(TimeSerial(Hour(Now()), Minute(Now()), Second(Now())), "hh:mm:ss") Selection.Text = "(" & sDate & ", " & sTime & ")" End Sub |
#2
|
|||
|
|||
![]()
It works here. Returning "Thu" here.
You code can be greatly simplified: Sub EntryDateII() Selection.Text = Format(Now, "yyyy-mm-dd DDD hh:mm:ss") End Sub |
#3
|
|||
|
|||
![]() Quote:
I would like to return THU instead of Thu. Thanks. |
#4
|
|||
|
|||
![]()
Selection.Text = UCase(Format(Now, "yyyy-mm-dd DDD hh:mm:ss"))
As the day of the week is the ONLY alpha text, it becomes uppercase. |
#5
|
|||
|
|||
![]()
Yes, thanks.
|
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
'Linking' entered information to other "cells" from an original "cell" in MS Word | Wade | Word | 6 | 09-03-2012 05:22 PM |
NumberFormat: Capitalised Weekday Letters??? | tinfanide | Excel Programming | 3 | 04-17-2012 04:46 AM |
How to edit the "Format" and the "show level" of an EXISTING table of content? | Jamal NUMAN | Word | 2 | 08-14-2011 10:46 AM |
![]() |
Jamal NUMAN | Word | 2 | 07-03-2011 03:11 AM |
"Microsoft Excel Application" missing in the "Component Services" on win08 | sword.fish | Excel | 0 | 02-26-2010 02:09 PM |