[AccessD] Date Issue

MarkH lists at theopg.com
Wed Jan 5 09:14:29 CST 2005


Don't use the # when entering from the prompt... Watch out for date
formats too... To avoid confusing months and days you may want to do
something like (UK, or whatever format is most suited)

	Format([Enter Date],"DD MMM YYYY")


Hth

mark

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Terri Jarus
Sent: 05 January 2005 15:07
To: accessd at databaseadvisors.com
Subject: Re: [AccessD] Date Issue


So much for easy - in my Query Grid for Start Date, I place the
criteria:  >#12/1/04#  and I get what I need.  However, if I want the
user to put in the date, such as [Enter Date], I get all the data again.
I try entering the date at the prompt as #12/1/2004# and it still
doesn't work.
 
Any ideas - why is this just not recognizing that the data is a date???
 
Thanks.
 
Terri Jarus
Vice President, Contract Services
jarus at amerinet-gpo.com
314-542-1902

>>> jarus at amerinet-gpo.com 1/5/2005 7:37:45 AM >>>

That did it - I knew it was easy, I just couldn't remember what the
function was.  Thanks for your help

Terri Jarus
Vice President, Contract Services
jarus at amerinet-gpo.com
314-542-1902.
>>> Gustav at cactus.dk 1/5/2005 6:53:48 AM >>>

Hi Terri

If you put that string inside CDate() you should be off:

datDate = CDate("01-05-2005")

The bulletproof method, however, is to break it into its separate
numeric parts and use DateSerial():

datDate = DateSerial(2005, 1, 5)

/gustav

>>> jarus at amerinet-gpo.com 05-01-2005 13:28:27 >>>
I am linked to a table of data from our AS400/DB2 system and a date
field appears as 20050105.  I need Access to read this as a date - what
is the best way to handle/convert this field.  I've tried breaking it
apart and putting it back together in a query as 01-05-2005 but Access
does not recognize as a date field.  I want to query out data based on a
date - please advise.

Thanks for your help.

Terri Jarus
Vice President, Contract Services
jarus at amerinet-gpo.com 
314-542-1902

-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com


------------------------------------------------------------------------
---
This email and any files transmitted with it are confidential and
intended solely for the use of the individuals or entities to whom they
are addressed. If you have received this email in error please return 
it to the sender, and erase any copies thereof.
Copyright 2004 Amerinet 1nc.
-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.827 / Virus Database: 564 - Release Date: 03/01/2005
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.827 / Virus Database: 564 - Release Date: 03/01/2005
 




More information about the AccessD mailing list