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

Substr function: grab yr from the 20030101

Status
Not open for further replies.

d1004

Programmer
May 9, 2002
78
US
Is there a function that could help me separate out the following date into year & month. The date is stored as 20030101 rather than 01/01/2003
 
To get the year as a value from the string "20030101", use:
Val(Left([YourField],4))
The month would be
Val(Mid([YourField],5,2))

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top