Changing date format in a form

S

Sokan33

I need to return day and month only, from birthdate field in a form that now
returns full date.

Thanks for your help.
 
6

'69 Camaro

Hi.
I need to return day and month only, from birthdate field

In the following example, DOB is the name of the field holding the date of
birth and txtDOB is the name of the text box holding this value, mon holds
the name of the month, and dy holds he number of the day:

Dim mon As String
Dim dy As Integer

mon = MonthName(Month(Me!txtDOB.Value))
dy = Day(Me!txtDOB.Value)


HTH.

Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips.

(Please remove ZERO_SPAM from my reply E-mail address so that a message will
be forwarded to me.)

- - -
When you see correct answers to your question posted in Microsoft's Online
Community, please sign in to the Community and mark these posts as "Answers,"
so that all may benefit by filtering on "Answered questions" and quickly
finding the right answers to similar questions. Remember that questions
answered the quickest are often from those who have a history of rewarding
the contributors who have taken the time to answer questions correctly.
 
S

Sokan33

Never mind folks. I fugure it out. In the texbox property I changed the
format to mm/dd.
 
Top