![]() |
|
#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
|
|
|
Similar Threads
|
||||
| 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 |
How to choose a "List" for certain "Heading" from "Modify" tool?
|
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 |