ACC97:Date Conversion - Date to Double 
Author Message
 ACC97:Date Conversion - Date to Double

I am looking for help in building the routine to take the contents of
a Date variable and convert it to a Double variable where the integer
portion is the typical number of days past 12/31/1899 and the decimal
portion is the fraction of time for that day. IE noon = .5

I can't seem to find anything in the help files or the knowledge base.
Thanks.

Denny Pasternak
------------------
Denny Pasternak
FDC - Teleservices
Omaha, NE



Sun, 16 Jun 2002 03:00:00 GMT  
 ACC97:Date Conversion - Date to Double
Hi Denny,
Try

CDbl(Now)

--
HTH

Chris Nebinger

Quote:
> I am looking for help in building the routine to take the contents of
> a Date variable and convert it to a Double variable where the integer
> portion is the typical number of days past 12/31/1899 and the decimal
> portion is the fraction of time for that day. IE noon = .5

> I can't seem to find anything in the help files or the knowledge base.
> Thanks.

> Denny Pasternak
> ------------------
> Denny Pasternak
> FDC - Teleservices
> Omaha, NE



Sun, 16 Jun 2002 03:00:00 GMT  
 ACC97:Date Conversion - Date to Double
On Wed, 29 Dec 1999 16:36:14 -0700, "Chris Nebinger"

Quote:

>Hi Denny,
>Try

>CDbl(Now)

Chris,

Your example works, but if Isubstitute a date type variable as the
argument I get an "expected identifer" error.

Is there something else I need to do when working with a variable as
the parameter to the CDbl function?

Thanks.
Denny
------------------
Denny Pasternak
FDC - Teleservices
Omaha, NE



Mon, 17 Jun 2002 03:00:00 GMT  
 ACC97:Date Conversion - Date to Double
The Date variable already holds a double number of the form you
describe. You can operate on it the same way you would operate on a
double variable.

 -- Andy

Quote:

>I am looking for help in building the routine to take the contents of
>a Date variable and convert it to a Double variable where the integer
>portion is the typical number of days past 12/31/1899 and the decimal
>portion is the fraction of time for that day. IE noon = .5

>I can't seem to find anything in the help files or the knowledge base.
>Thanks.

>Denny Pasternak
>------------------
>Denny Pasternak
>FDC - Teleservices
>Omaha, NE



Tue, 18 Jun 2002 03:00:00 GMT  
 ACC97:Date Conversion - Date to Double
Upon reviewing my code again, I discovered that my problem was due to
using an intermediate function on the date variable and not declaring
that function as a date type.

Thanks for all the advice. It's appreciated.

Denny Pasternak

On Wed, 29 Dec 1999 16:49:21 -0600, Denny Pasternak

Quote:

>I am looking for help in building the routine to take the contents of
>a Date variable and convert it to a Double variable where the integer
>portion is the typical number of days past 12/31/1899 and the decimal
>portion is the fraction of time for that day. IE noon = .5

>I can't seem to find anything in the help files or the knowledge base.
>Thanks.

>Denny Pasternak
>------------------
>Denny Pasternak
>FDC - Teleservices
>Omaha, NE

------------------
Denny Pasternak
FDC - Teleservices
Omaha, NE


Tue, 18 Jun 2002 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Date - date = date

2. Compare date in form with date/time in form with date/time in database

3. Dates dates dates

4. Dates, Dates, & More Dates

5. Concatenation of complex date criteria Acc97

6. ACC97 - date() not recognised as a control source

7. ACC97: Retrieving file date and time

8. Acc97: Need VBA help on a date range function

9. QBasic MBF Double Conversion to VB6 Floating Point Double

10. YYYYMMDD string date conversion

11. Access 97 date conversions

12. Date Conversion

 

 
Powered by phpBB® Forum Software