Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
datePart Function
Hi there,
Is there DatePart function, like that found in MS Access, which enables me to separate day, month and year, filtering then, on specific parts of a date? -- Carlee |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
datePart Function
=TEXT(cell name containing date,"dddd")
use "mmm" for abbrev. month name use "yyyy" for year I think this will work for what you want. Brent "Carlee" wrote: Hi there, Is there DatePart function, like that found in MS Access, which enables me to separate day, month and year, filtering then, on specific parts of a date? -- Carlee |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
datePart Function
Hi Carlee,
The DatePart function is available in Excel VBA. Sub test() Dim iDay As Integer Dim iYear As Integer Dim iMonth As Integer iYear = DatePart("yyyy", Now) iMonth = DatePart("m", Now) iDay = DatePart("d", Now) 'or you can also use: iYear = Year(Now) iMonth = Month(Now) iDay = Day(Now) End Sub -- Hope that helps. Vergel Adriano "Carlee" wrote: Hi there, Is there DatePart function, like that found in MS Access, which enables me to separate day, month and year, filtering then, on specific parts of a date? -- Carlee |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
copy of excel file not showing formulal/function in the function b | Excel Discussion (Misc queries) | |||
LINKEDRANGE function - a complement to the PULL function (for getting values from a closed workbook) | Excel Worksheet Functions | |||
Excel - User Defined Function Error: This function takes no argume | Excel Programming | |||
DatePart Function in VBA | Excel Programming | |||
Datepart problem | Excel Programming |