Re: Query expression needed to edit data
From: Alp Bekisoglu (someone_at_somewhere.com)
Date: 02/29/04
- Next message: jim: "select 2nd - 5th records?"
- Previous message: Harmannus: "Re: date()"
- In reply to: John Spencer (MVP): "Re: Query expression needed to edit data"
- Next in thread: John Spencer (MVP): "Re: Query expression needed to edit data"
- Reply: John Spencer (MVP): "Re: Query expression needed to edit data"
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 29 Feb 2004 15:56:16 +0800
Hi John,
I'm sorry to jump in on the issue but you have pointed to something I had
been looking for. Caould you tell me how can I get that date number? I had
once figured it out in Excel but completely forgot how I did it.
I have tried a lot of things in Access to get that numeric value but to no
avail. Your advice will be highly appreciated.
Thanks,
Alp
"John Spencer (MVP)" <spencer4@comcast.net> wrote in message
news:40414E50.A77D7C68@comcast.net...
> Take a look at the CDate function. It will convert the string to a valid
date
> time. If the string is invalid you will get an error.
>
> If you need just the date, you can use the DateValue function.
>
> Once it is converted using CDate, you can use the format function to
return the
> date (as a string) in the format you want. In Access dates are stored as
a
> number representing the number of days and partial days (for time) since
> midnight on 12/31/1899.
>
>
>
> BobV wrote:
> >
> > I have an Access db for which the data is imported from another type of
db.
> > One of the fields in the source db is a date field, but it's formatted
as:
> >
> > 2/2/2004 04:17:58 PM
> >
> > Access won't import this format as a date field, so I changed it to a
text
> > field during the import process. Now, I would like to delete the ending
> > space and the AM or PM (basically, everything after the seconds digits).
> > How would I go about doing that? Afterwards, I figured I could then
covert
> > it to a Date/Time field, and use it the way it was intended, since I
need to
> > run queries based on a date range.
> >
> > Also, is the format of the date itself a problem......if so, how would I
add
> > 0's where necessary?.....02/02/2004 instead of 2/2/2004.
> >
> > Any help would be appreciated...thanks,
> > Bob
- Next message: jim: "select 2nd - 5th records?"
- Previous message: Harmannus: "Re: date()"
- In reply to: John Spencer (MVP): "Re: Query expression needed to edit data"
- Next in thread: John Spencer (MVP): "Re: Query expression needed to edit data"
- Reply: John Spencer (MVP): "Re: Query expression needed to edit data"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|