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!

Date Format in a Query

Status
Not open for further replies.

tma12000

IS-IT--Management
Nov 24, 2003
19
US
Hi there,
I am trying to create create a query that will automatically generate a service ticket# when certain fields on a form are entered. The date is a Now() function off the original table. For purposes of the ticket# I need to have only the "03" pulled off the end of the date. Here is what the query would look like if I could use the entire date. Any help with the code to pnly reflect the last 2 digit of the year would be greatly appreciated.

Ticket#:[dateelement#1]&[dataelement#2]&[DATE]

How do I get the "DATE" to only show the "03" in 2003?

Thanks,
Tim
 
Thanks Paul, the output of that gave me the whole year (2003), how would I get to just the "03"

THanks again,
Tim
 
This should do it.

Ticket#:[dateelement#1]&[dataelement#2]& Format(Date,"yy")


Paul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top