HP3000-L Archives

March 2000, Week 4

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Bob Walker <[log in to unmask]>
Reply To:
Date:
Fri, 24 Mar 2000 09:46:51 PST8PDT
Content-Type:
text/plain
Parts/Attachments:
text/plain (47 lines)
One way to create a view and cast the values to the different types.
We use this trick quite often in views to deal with implied 2 decimal
place values. For example 1.5 credits is stored as a short as 150
and is displayed in a view with  :
  cast(cast(credits,real) / 100.0,decimal(5,2))

Something like this might work for dates:
Create view MyView ( ViewDate, ViewTime )
as Select
cast(DBDate,Date,"YYYYMMDD"),  /* syntax here may be wrong */
cast(DBTime,Time,"HHMMSS")   /* check the ALLBASE manual */
from MySet;

The problem you will have is that MS Access(and MS SQL Server)
do not incorporate separate Date and Time data items, only a
DateTime data item.

There may be some trick you can use to combine your two
database fields into one DateTime view field.  I don't know what that
trick would be right now but it might be worth a shot..

On 24 Mar 00, at 9:11, Gary Nolan wrote:

> Hi Folks,
>
> I am experimenting with ODBC/SE and have a dumb question. I have two fields
> in a TurboIMAGE database.
>
> DATE X 8   (yyyymmdd)
> TIME X 6    (hhmmss)
>
> How do I get ODBC - MS Access to understand that these are date and time
> fields? Access seems to only understand these fields only when the date has
> '/', and the time ':' in the data. I know I must be missing something
> simple. Any suggestions would be appreciated.
>
> Thanks
> Gary Nolan
> Sydney Steel Corporation


--=--=--
Bob Walker, Computer Centre  --  [log in to unmask]
Capilano College, North Vancouver, BC, CANADA.
------
'No one is listening until you make a mistake.'

ATOM RSS1 RSS2