Question on Date Manipulation

M

Manuel

Hi there,

I am trying to get the current month from a specific date,
let's say (CloseDate).

Hos do I get the current month out of this date?

Thanks in Advance.

Manuel
 
S

SteveD

I use the datepart function
MyMonth = Datepart("M",[TodaysDate])
(the result = 1)

look to the help regarding this function - it has many
more features associated.
IE: "YYYY" for year
"D" for Day
"M" for month (1 for january)
"Q" for quarter
"w" for weekday
"ww" for week

and the list goes on.

HTH
SteveD
 
J

John W. Vinson

Manuel said:
Hos do I get the current month out of this date?

For the month number, 1-12:

Month([datefield])

For the month name:

Format([datefield], "mmmm")
 
Top