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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Default Date Formatting 1

Status
Not open for further replies.

ahg

Technical User
Aug 21, 2002
27
CA
I have a dialog box in which the client is asked to set the begin and ending dates of a list of records he wishes to display in another continuous form. I set the defaults of Begin date to "Jan 1" and End date to Date() so all records will, by default, be displayed between Jan 1 of the current year and Today. Unfortunately when these dates are copied from the date fields and displayed on the continuous form they show as "Between Jan 1 and Sept 1 2002". I want to make the default Begin date show as Jan 1 2002 rather than just Jan 1.
Can anyone show me how to set the default Begin date to Jan 1 of the current year so it will display as Jan 1 2002 please?

Thanx for any help.

Tony
 
Hi

Try

= CDate("01/01/" & Year())

Regards
Ken Reay
Freelance Developer
kenneth.reay@talk21.com
 
Thanks Ken,

Tried it but it says there's the wrong number of arguments!

Tony
 
Hi

Sorry, should be:

CDate("01/01/" & Year(Date()))

Regards
Ken Reay
Freelance Developer
kenneth.reay@talk21.com
 
Many thanks Ken,

That works a treat. I owe you one!

Tony
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top