Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to get from date......?

Status
Not open for further replies.

Vitaminas

Programmer
May 15, 2005
4
PT
Hello,


I would like some help working with dates in Access.How i can take just the number of the month from a Date.
I hope that someone can help me, thank you.



Vitaminas
 
Vitaminas,
straight from help:
Month Function Example
This example uses the Month function to obtain the month from a specified date. In the development environment, the date literal is displayed in short date format using the locale settings of your code.

Dim MyDate, MyMonth
MyDate = #February 12, 1969# ' Assign a date.
MyMonth = Month(MyDate) ' MyMonth contains 2.

hth
regards,
longhair
 
To assign it to a variable: month( <mydatevalue> )
To display it in a date field, format the date field as "n" or "mm".

Mike Krausnick
Dublin, California
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top