You can also format the call as d to show just the day.
From: ExcelVBA@yahoogroups.com [mailto:ExcelVBA@yahoogroups.com] On Behalf Of andycoulthart
Sent: 07 November 2011 21:15
To: ExcelVBA@yahoogroups.com
Subject: [ExcelVBA] extracting date display
Hi,
I'm trying to extract part of a date (as it's displayed) but can only access the underlying Excel
number code.
On a worksheet I enter =Date() in a cell formatted as mm/dd/yyyy (displayed as 10/27/2011).
I now try to extract the day (27) as the number 27.
I've tried Mid, Left etc and Paste Special but these only return part of the date code and also
tried formatting cells as text - to no avail.
Is there a macro I can write which can achieve this?
Many thanks,
Andy
__._,_.___
----------------------------------
Be sure to check out TechTrax Ezine for many, free Excel VBA articles! Go here: http://www.mousetrax.com/techtrax to enter the ezine, then search the ARCHIVES for EXCEL VBA.
----------------------------------
Visit our ExcelVBA group home page for more info and support files:
http://groups.yahoo.com/group/ExcelVBA
----------------------------------
More free tutorials and resources available at:
http://www.mousetrax.com
----------------------------------
Be sure to check out TechTrax Ezine for many, free Excel VBA articles! Go here: http://www.mousetrax.com/techtrax to enter the ezine, then search the ARCHIVES for EXCEL VBA.
----------------------------------
Visit our ExcelVBA group home page for more info and support files:
http://groups.yahoo.com/group/ExcelVBA
----------------------------------
More free tutorials and resources available at:
http://www.mousetrax.com
----------------------------------
MARKETPLACE
.
__,_._,___
Tidak ada komentar:
Posting Komentar