DateDiff Question

J

Jeff G

Good Day Everyone!

I need an expression for my query. What I have is a database tracking
bearing temperatures. My table (what the query is based on) looks like this,
(this is abbreviated, there are actually 4 sets of bearings in this table all
named differently):

MroczekFurnaceBearingTemps: Table

Pre-Quench Drive Bearing Install Date Pre-Quench Drive Bearing Temp
07Aug07 78

79

88

89

79


If you notice the Install Date does not contain a date for each entry. The
only time an entry would be made is if the bearing were changed out. What I’m
trying to determine is how many days are between change out dates. Since I
haven’t changed out this particular bearing yet, I want it to calculate the
DateDiff from today ( Date() ).
I’ve tried this expression:

DateDiff (“d†[Date()],Pre-Quench Drive Bearing Install Date)

It returns nothing. Just a blank line, not even any kind of error.
I’m a novice at this expression writing stuff and I have no idea how to
actually write code. I’m a mechanic trying to keep our down time to a minimum
with predictive maintenance. Any help would be greatly appreciated. ACCESS
2003
 
G

George

Dear Jeff, try the following in your query:

Mydate: DateDiff("d",[FromDate],Date())

Change [FromDate] to your date field.

GeorgeCY

Ο χÏήστης "Jeff G" έγγÏαψε:
 
G

glen stevens

Jeff G said:
Good Day Everyone!

I need an expression for my query. What I have is a database tracking
bearing temperatures. My table (what the query is based on) looks like
this,
(this is abbreviated, there are actually 4 sets of bearings in this table
all
named differently):

MroczekFurnaceBearingTemps: Table

Pre-Quench Drive Bearing Install Date Pre-Quench Drive Bearing Temp
07Aug07 78

79

88

89

79


If you notice the Install Date does not contain a date for each entry. The
only time an entry would be made is if the bearing were changed out. What
I’m
trying to determine is how many days are between change out dates. Since I
haven’t changed out this particular bearing yet, I want it to calculate
the
DateDiff from today ( Date() ).
I’ve tried this expression:

DateDiff (“d†[Date()],Pre-Quench Drive Bearing Install Date)

It returns nothing. Just a blank line, not even any kind of error.
I’m a novice at this expression writing stuff and I have no idea how to
actually write code. I’m a mechanic trying to keep our down time to a
minimum
with predictive maintenance. Any help would be greatly appreciated. ACCESS
2003
 
J

Jeff G

Unfortunately no help. I still get blank fields. But I’m not giving up!!!
Thanks for the very quick reply.

--
Jeff G
Maintenance Tech
Milgard Tempering


George said:
Dear Jeff, try the following in your query:

Mydate: DateDiff("d",[FromDate],Date())

Change [FromDate] to your date field.

GeorgeCY

Ο χÏήστης "Jeff G" έγγÏαψε:
Good Day Everyone!

I need an expression for my query. What I have is a database tracking
bearing temperatures. My table (what the query is based on) looks like this,
(this is abbreviated, there are actually 4 sets of bearings in this table all
named differently):

MroczekFurnaceBearingTemps: Table

Pre-Quench Drive Bearing Install Date Pre-Quench Drive Bearing Temp
07Aug07 78

79

88

89

79


If you notice the Install Date does not contain a date for each entry. The
only time an entry would be made is if the bearing were changed out. What I’m
trying to determine is how many days are between change out dates. Since I
haven’t changed out this particular bearing yet, I want it to calculate the
DateDiff from today ( Date() ).
I’ve tried this expression:

DateDiff (“d†[Date()],Pre-Quench Drive Bearing Install Date)

It returns nothing. Just a blank line, not even any kind of error.
I’m a novice at this expression writing stuff and I have no idea how to
actually write code. I’m a mechanic trying to keep our down time to a minimum
with predictive maintenance. Any help would be greatly appreciated. ACCESS
2003
 
J

Jeff G

O.K. I’m a knucklehead……I got it working now. Just needed to put the
expression in a new field in the query……Works perfectly. Thank you very much.
--
Jeff G
Maintenance Tech
Milgard Tempering


George said:
Dear Jeff, try the following in your query:

Mydate: DateDiff("d",[FromDate],Date())

Change [FromDate] to your date field.

GeorgeCY

Ο χÏήστης "Jeff G" έγγÏαψε:
Good Day Everyone!

I need an expression for my query. What I have is a database tracking
bearing temperatures. My table (what the query is based on) looks like this,
(this is abbreviated, there are actually 4 sets of bearings in this table all
named differently):

MroczekFurnaceBearingTemps: Table

Pre-Quench Drive Bearing Install Date Pre-Quench Drive Bearing Temp
07Aug07 78

79

88

89

79


If you notice the Install Date does not contain a date for each entry. The
only time an entry would be made is if the bearing were changed out. What I’m
trying to determine is how many days are between change out dates. Since I
haven’t changed out this particular bearing yet, I want it to calculate the
DateDiff from today ( Date() ).
I’ve tried this expression:

DateDiff (“d†[Date()],Pre-Quench Drive Bearing Install Date)

It returns nothing. Just a blank line, not even any kind of error.
I’m a novice at this expression writing stuff and I have no idea how to
actually write code. I’m a mechanic trying to keep our down time to a minimum
with predictive maintenance. Any help would be greatly appreciated. ACCESS
2003
 

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