473,401 Members | 2,146 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,401 software developers and data experts.

access97: date string

Can anyone give me some direction on how to return values without the "/"
since access imports the "7/1/2003" with the "/".

in my query i tried:

date: (DatePart("mmddyyy",[Field2]))

but i received an error message in the field "#Error" when i go to view it.

eventually i want to export it to a text file but when i do export it,
it still formatted as "7/1/2003" instead of "07012003".

any help would be appreciated.
thanks- jung
Nov 12 '05 #1
3 3204
DateAsString: Format([InDate],"dd") & Format([InDate],"mm") &
Format([InDate],"yyyy")
Assumes that your InputDate is a date and that you are British (Your input
date is 7th January not 1st July). Whoops!!!, you are French. Which way
round are your dates?
Phil
"JMCN" <pi******@yahoo.fr> wrote in message
news:27**************************@posting.google.c om...
Can anyone give me some direction on how to return values without the "/"
since access imports the "7/1/2003" with the "/".

in my query i tried:

date: (DatePart("mmddyyy",[Field2]))

but i received an error message in the field "#Error" when i go to view it.
eventually i want to export it to a text file but when i do export it,
it still formatted as "7/1/2003" instead of "07012003".

any help would be appreciated.
thanks- jung

Nov 12 '05 #2
In the query name field (design view of the query) write this:

Dtefld:Format(Datefld, "mmddyyyy")

that will convert "07/01/2003" to "07012003" using the VBA Format
function. This is also in the Access Help files under Format. If you
say Format(datefld, "mm-dd-yyyy") this will return "07-01-2003" (without
the quotations - I add those for emphasis).

Rich

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 12 '05 #3
Rich P <rp*****@aol.com> wrote in message news:<3f***********************@news.frii.net>...
In the query name field (design view of the query) write this:

Dtefld:Format(Datefld, "mmddyyyy")

that will convert "07/01/2003" to "07012003" using the VBA Format
function. This is also in the Access Help files under Format. If you
say Format(datefld, "mm-dd-yyyy") this will return "07-01-2003" (without
the quotations - I add those for emphasis).

Rich

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


thank you both!

phil - on my database, it is international with the dates. for
instance, the french format is exactly to the british but the "usa"
format is "mm-dd-yyyy".

cheers! jung
Nov 12 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Al Kolff | last post by:
Found this at http://icc.ucdavis.edu/iccdocs/joes.htm It does work and is so much easier than anything else I tried. PROBLEM: How to move all tables in an Access Database to MySql (data and...
1
by: SnowsAngel | last post by:
Hi Everyone, I am a newbie to this forum but am at my wits end. I have a problem with Dates in Access. It is happening in two seperate applications. I am in Australia and need to have...
15
by: U N Me | last post by:
I have a continuous form that lists records from a query. One of the columns is an amount field, In the footer of the form I place a text box that displays the total (sum) of the amount. The...
1
by: Internet Arrow Limited | last post by:
Hi, I have an access application that uses the code: > Me!txtCreationDate = Format(Date, "Long Date") & " " & Format(Time, "hh:mm:ss") This works fine under access 2000 and access97 on...
0
by: JMCN | last post by:
hi i'm trying to create an input box that will ask the users for the date (LW_Date)and then, open up the pass-through query with the specific date results from the input box. i typed in the date...
1
by: Mario Crevits | last post by:
My name is Mario Crevits, I'm from Belgium (Roeselare) and I'm working with Access97 for several years now. We are in an Access97-2000 migration project. I'm writing a wizard for the end-users to...
2
by: Eugenio | last post by:
Sorry in advance for my english. :-) I have a form MS Access97 with two subforms. These subforms have different data and dimensions, if into the main form I've selected with checkbox "Date of...
9
by: JJM0926 | last post by:
I'm trying to create a running totals query in access 97. I have followed the directions on how to do it from Microsofts website article id 138911. I took their code they had and replaced it with...
3
by: Ramchandar | last post by:
Hi, I am creating reports using VBA code. I have the same query in a querydef residing both in Access97 and Access2003. The result of this querydef is then moved to a table in Access97 and...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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...

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.