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

Simple date question!

Status
Not open for further replies.

99mel

Programmer
Oct 18, 1999
379
GB
Just a simple one here,&nbsp;&nbsp;all i'm wanting is the current year in the format yyyy (data got from the system).&nbsp;&nbsp;I've had a look at the Format Function but can't find anything for this.<br><br>Thanks<br><br>Mel
 
x = format(now,&quot;mm/dd/yyyy&quot;)<br>Keep in mind that if you send this to a database like Access and you view it in the database it may be set to just 23 digits for the year. Which will truncate or manipulate the date to 00/00/00.<br><br>OK<br>
 
You almost had it!<br><br>MsgBox = Format(Now, &quot;yyyy&quot;)<br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top