473,503 Members | 11,735 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Exporting Date() to a Text File without exporting the time too

22 New Member
I am exporting a Query to a Text File. One of my fields is the current Date. F1:Date()

When I look at the text file, my date is displaying the System Date which includes the time.
Example: 10-29-2012 0:00:00

I only want to export the date portion but can't figure out how to get rid of the time portion.
Desired Result: 10-29-2012

In the query, I did try playing with the Field Properties with Format = Short Date and Input Mask = 99/99/0000, but this did not give me my Desired Result.

Any suggestions?
Oct 29 '12 #1
3 1977
NeoPa
32,557 Recognized Expert Moderator MVP
Use a string value from the Format() function. The Format property of a non-string field is only used in certain circumstances where humans are involved and doesn't change the fact that the field is intrinsically a Date/Time field. The value returned by the Format() function, on the other hand, is not a Date at all, but a string. Exactly what you require :-)
Oct 30 '12 #2
zmbd
5,501 Recognized Expert Moderator Expert
Build a calculated field in the query using the following:format([field],"yyyy-MM-dd") this will take the date value in the [field] and convert it to the string... in this case something like "2012-10-29"
http://msdn.microsoft.com/en-us/libr.../gg251755.aspx
Oct 30 '12 #3
zmbd
5,501 Recognized Expert Moderator Expert
Most Welcome...
That little format function is really usefull once the formating strings are mastered... take notice of the "sections" within the formatting string (about 1/2 thru the link) they will become usfull in alot of situations.
Oct 30 '12 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
3950
by: nunYa | last post by:
I am trying to use the DoCmd.TransferText method to export an access table to a Tab Delimited Text File. I have put the code behind the onclick event of a button and keep getting the error...
2
1830
by: Jeffrey | last post by:
What classes/methods can I use to do the following? 1. Open a text file (less than 50k in size) 2. Replace some text in it. 3. Close the text file. I don't want to have to create a new file...
1
1613
by: =?Utf-8?B?UGF0cml4MzE3?= | last post by:
Caveat: newbie I would like to take the contents of the datagrid on my form and export it record by record to a flat text file. After some time searching, I came across two items: ...
17
1867
by: mustakbal | last post by:
How can I read only a section of a text file at a time.Say I have a text file of 1000 rows as database and I want to read from row 1 to 200 only, then maybe from 201- 275 and so on. What is the...
3
4505
by: Tom | last post by:
I don't want to re-invent the wheel and am looking for a simple implementation of a text viewer or RichTextBox in read only mode that allows rapid file positioning within large data files without...
4
3311
by: mvvdsteen | last post by:
Hello all, I'm quite new to c++. I made a small program that will help me analyse wind tunnel data. But now I want this program to write to a text file. This works just fine, except it discards...
5
2091
by: Myxamatosis | last post by:
Currently I need to read data from a file, such like this Measurements for Lansing, Michigan during April, 2000 63 32 0.00 54 43 0.10 59 39 0.00 46 24 0.00 52 20 0.00 54 30 0.00
0
712
by: rohitnegi09 | last post by:
when we upload the any file in asp.net then how to convert the format of any file in text document in asp.net.how is it possible?
4
1605
by: CD Tom | last post by:
This is driving me nuts!!! I have a table that one of the columns is set as Double, Fixed, 3 digits. I try and export this to a .txt file for a backup using the docmd.transfertext command but when I...
4
2899
by: GeneticsJustin | last post by:
Hi everyone, I'm new to python and would like to split a FASTA (text) file into each different gene (separated by a ">"), randomly sample a certain number of the sequences, and print the result. I...
0
7212
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7296
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7364
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7017
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
5026
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3186
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3174
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
751
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
405
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.