Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    Sep 2002
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Leading Zeros (Access 2003)

    Hi All
    As part of process i am required to export a table to .txt format within which lies a date field. The requirement for the date field is that it contain 8 characters and no separaters. My issue is that, fro day and months that have a value of less than 10 the leading zero is dropped. Any Suggestions / help would be appreciated.

    TGO

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Leading Zeros (Access 2003)

    Create a query based on the table. Add a column
    <code>
    ExportDate: Format([DateField],"mmddyyyy")
    </code>
    where DateField is the name of your date field. ExportDate will be the name of the field in the export. Change the format string as needed. If you export the query to a text file, the date should be in the required format.

  3. #3
    New Lounger
    Join Date
    Sep 2002
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Leading Zeros (Access 2003)

    Thanks HanV <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •