Skip to Content
0
Former Member
Mar 06, 2008 at 09:20 AM

How to add hours to a date field and a time field to get new date and time?

58 Views

Hi,

I have five fields in a table, namely:

1. Start Date (Date type)

2. Start Time (Time type)

3. Planned Duration (Number type)

4. End Date (Date type)

5. End Time (Time type)

A user enters values in the "Start Date", "Start Time" and number of hours in the "Planned Duration" fields.

I have to add the number of hours entered in the "Planned Duration" field to the date value in the field "Start Date" to obtain the value for the field "End Date". That is:

Planned Duration + Start Date = End Date

Similary, I have to add the number of hours entered in the "Planned Duration" field to the time value in the field "Start Time" to obtain the value for the field "End Time". That is:

Planned Duration + Start Time = End Time

How do I achieve this?

Regards,

Nitin