Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 155
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 109
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 857
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
copy of excel file not showing formulal/function in the function b oaallam Excel Discussion (Misc queries) 4 September 6th 07 01:20 PM
LINKEDRANGE function - a complement to the PULL function (for getting values from a closed workbook) [email protected] Excel Worksheet Functions 0 September 5th 06 03:44 PM
Excel - User Defined Function Error: This function takes no argume BruceInCalgary Excel Programming 3 August 23rd 06 08:53 PM
DatePart Function in VBA ExcelMonkey Excel Programming 3 March 21st 06 12:49 PM
Datepart problem Ron Dean Excel Programming 7 January 6th 06 03:04 PM


All times are GMT +1. The time now is 09:54 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"