exporting date as txt

agorman

Registered User.
Local time
Today, 15:52
Joined
Dec 30, 2006
Messages
68
Hi,

I have been trying to export a query as a text file including a date field. When it exports the data, the datye field shows the correct dates as enterend on the form of my db, but includes 00:00:00, which I assume is a time.

Is there a way to omit this time being appended to the date ?

Thanks
 
Don't send the date field as is in the query. Modify it to use format.

MyNewDateFieldName:Format([OriginalDateFieldNameHere], "dd/mm/yyyy")

(use whichever format is your format - I just picked one for display purposes)
 
I would crate a calculated field in the query using DateValue() or Format().

Example:
Code:
? Now()  & " with time removed using DateVaule: "  & DateValue(Now())
10/27/2009 11:46:44 AM with time removed using DateVaule: 10/27/2009

? Now()  & " with time removed using Format: "  & Format(Now(), "mm/dd/yyyy")
10/27/2009 11:47:21 AM with time removed using Format: 10/27/2009
 
Thanks for the quick reponse Bob - works great.

One more thing if it is not too much to ask:

I want add a field in the query the creates a date 12 months ahead of the origional date field (the date field is renewal date for membership club, so I would like to auto generate a date that the member is due to renew again -in 12 months time) below is how I entered the code you gave.

RenewalDate:Format([DateRenewed], "dd/mm/yyyy")

thanks again
 
This should do it for you:

RenewalDate:Format(DateAdd("yyyy", 1, [DateRenewed]),"dd/mm/yyyy")
 
Thanks again Bob - works great.

Thanks for your response also Boyd - but that coding is alittle too high tech for my level (wouldn't even know where to put it !)

Regards to both of you
 

Users who are viewing this thread

Back
Top Bottom