Adding back Leading Zeros

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a query with the following field

trim(str(format( [Contracts].[EXP_DATE],"MMYY")))

When I use a TransfeText macro function to export the data - single digit
months lose there leading zero.

How do I structure for format statement to ouput January-2005 as 0105
 
Pete
What are you exorting to?
If it is excel, than Excel is formatting as a general number format, which
will drop the leading zero.

Try exporting to a text file, and you should keep your formatting.

Rosco
 
Format(trim(str(format( [Contracts].[EXP_DATE],"MMYY"))),"0000")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top