Formatting Question

B

Bunky

I have two tables from outside sources. Table A has a timestamp on it and
Table B has a period of time on it. The Table A timestamp has it's data
showing '9/28/2009 9:00:00 AM'. Table B has the period showing 9:00:00 AM
but no timestamp. Both the timestamp and the period are defined as a
Date/Time field.

What I need to do is format the '9:00:00 AM' from Table A in such a way that
it can be joined to the period on Table B. The AM or PM MUST STAY. I tried
Period: Format([kwtest-01].[Timestamp],("hh:nn:ss")) but the AM / PM was gone.

Ideas??
 
D

Douglas J. Steele

If you're talking about Date fields, the format only affects how it's
displayed, not what's stored. Under the covers, Date fields are eight byte
floating point numbers, where the integer portion represents the date as the
number of days relative to 30 Dec, 1899 and the decimal portion represents
the time as a fraction of a day.

Use the TimeValue function on the timestamp in Table A to retrieve only the
time portion, and compare it to the value in Table B.
 
B

Bunky

Doug,

You are a Gentleman and a Scholar! Thank you very much!


Kent

Douglas J. Steele said:
If you're talking about Date fields, the format only affects how it's
displayed, not what's stored. Under the covers, Date fields are eight byte
floating point numbers, where the integer portion represents the date as the
number of days relative to 30 Dec, 1899 and the decimal portion represents
the time as a fraction of a day.

Use the TimeValue function on the timestamp in Table A to retrieve only the
time portion, and compare it to the value in Table B.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Bunky said:
I have two tables from outside sources. Table A has a timestamp on it and
Table B has a period of time on it. The Table A timestamp has it's data
showing '9/28/2009 9:00:00 AM'. Table B has the period showing 9:00:00 AM
but no timestamp. Both the timestamp and the period are defined as a
Date/Time field.

What I need to do is format the '9:00:00 AM' from Table A in such a way
that
it can be joined to the period on Table B. The AM or PM MUST STAY. I
tried
Period: Format([kwtest-01].[Timestamp],("hh:nn:ss")) but the AM / PM was
gone.

Ideas??
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top