Export routine changes date format

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Gilz

    #1

    Export routine changes date format

    Hi

    I am having trouble with the transfertext acexportdelim function.

    I have written several routines that export queries with date fields. I
    have put format statements in the download queries as so that the data
    is exported as dd/mm/yy.

    Every time i run this it exports the dates as dd/mm/yy nn:hh:ss i
    really don't understand why.

    I built a brand new database with one table called Dates, and one field
    named Birthdays

    I created an export spec for this table and a qry in which i wrote the
    following syntax

    Birthdays: format([Dates].[Birthdays],"dd/mm/yy")

    I then put one record in the table, ran the export and low and behold
    the export still reads 01/01/01 00:00:00

    I really don't understand how this is happening.

    Thanks for any help in advance.

    Gillian

  • Tom van Stiphout

    #2
    Re: Export routine changes date format

    On 26 Jan 2007 08:54:45 -0800, "Gilz" <gdonald@tlpsys tems.co.uk>
    wrote:

    It's simple once you realize that there is a difference between a date
    VALUE and a date FORMAT.
    The value of a variable of type Date is always an 8-byte entity that
    includes seconds. How you format that, is entirely up to you. Your
    viewer will also have a particular format built-in, so it may display
    seconds. Not to worry, in your forms or reports you can still format
    exactly the way you like.

    -Tom.

    >Hi
    >
    >I am having trouble with the transfertext acexportdelim function.
    >
    >I have written several routines that export queries with date fields. I
    >have put format statements in the download queries as so that the data
    >is exported as dd/mm/yy.
    >
    >Every time i run this it exports the dates as dd/mm/yy nn:hh:ss i
    >really don't understand why.
    >
    >I built a brand new database with one table called Dates, and one field
    >named Birthdays
    >
    >I created an export spec for this table and a qry in which i wrote the
    >following syntax
    >
    >Birthdays: format([Dates].[Birthdays],"dd/mm/yy")
    >
    >I then put one record in the table, ran the export and low and behold
    >the export still reads 01/01/01 00:00:00
    >
    >I really don't understand how this is happening.
    >
    >Thanks for any help in advance.
    >
    >Gillian

    Comment

    Working...