×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Adding labor hours to a date time field

Adding labor hours to a date time field

Adding labor hours to a date time field

(OP)
Can you tell me how to add a labor hours field to a datetime field?

Works: DateAdd("n", 30, {HIST_ILLUM_LOG.END_TIME})
Doesn't work: DateAdd("n", {@labor hours}, {HIST_ILLUM_LOG.END_TIME})

RE: Adding labor hours to a date time field

MySql does not have DateAdd() function, it does have DATE_ADD() Function
with the Syntax of
DATE_ADD(date, INTERVAL value addunit)

RE: Adding labor hours to a date time field

(OP)
Labor hours is in a different table,
I tried this and still doesn't work

UPDATE HIST_ILLUM_LOG
SET END_TIME = DateAdd("n", {@labor hours}, END_TIME)

RE: Adding labor hours to a date time field

DateAdd() is an Access function (I guess you are doing this in Access, right?).
Date_Add() is a MySQL function.

Some more information would be nice to have in order to help you.

---- Andy

"Hmm...they have the internet on computers now"--Homer Simpson

RE: Adding labor hours to a date time field

(OP)
No, I'm Using crystal reports, Database is for Dessault Systems IQMS
It has a date time field for when a job ends on a machine "{HIST_ILLUM_LOG.END_TIME}".
It does not have a date time field for when the setup ends/machine starts running so I am trying to add the amount of setup time (in hrs) to show the date time that the machine started running.

RE: Adding labor hours to a date time field

So you have a table HIST_ILLUM_LOG with a field END_TIME
>Labor hours is in a different table
What's the name of that table, field name with the Labor hours, and what is the relation between the two tables?

---- Andy

"Hmm...they have the internet on computers now"--Homer Simpson

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close