Re: Query expression needed to edit data

From: Alp Bekisoglu (someone_at_somewhere.com)
Date: 02/29/04


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



Relevant Pages

  • Re: Date format detection
    ... Specifies the locale for which the date string is to be formatted. ... date format for this locale. ... the system default-date format for the specified locale. ... be enclosed within single quotation marks in the date format picture. ...
    (borland.public.delphi.thirdpartytools.general)
  • Re: Date format detection
    ... > Specifies the locale for which the date string is to be formatted. ... > date format for this locale. ... > the system default-date format for the specified locale. ... > be enclosed within single quotation marks in the date format picture. ...
    (borland.public.delphi.thirdpartytools.general)
  • Re: Query expression needed to edit data
    ... Take a look at the CDate function. ... If the string is invalid you will get an error. ... Once it is converted using CDate, you can use the format function to return the ...
    (microsoft.public.access.queries)
  • Re: Date confusion
    ... Read my reply elsewhere in this string. ... > integer portion of the value represents the date as the number of days ... >> If you are working with a numeric date and you want the format DDMMYYYY, ... Another reason for preferring to store a date as text would be personal preference. ...
    (microsoft.public.access.modulesdaovba)
  • Re: Regular Expression - old regex module vs. re module
    ... The ReportTemplate class reads a template file or string containing a ... header and line format for multiple calls with sequence data. ... def _format: ...
    (comp.lang.python)