How to add a date with the time in ax and get a updated date in ax

Hi,

There is a time field with hh:mm format and there is a date field,so while clicking the button the time field should be added with date field and get a updated date with the corresponding time.Can anybody help me in this.

pls help in this.

There is a time field with hh:mm format and there is a date field,so while clicking the button the time field should be added with date field and get a updated date with the corresponding time.Can anybody help me in this.This issue is in ax 4.0

Can you explain the purpose of doing and what exactly you are trying to do?

because the time field will not take more than 24 hours and only the 24 hours will add a day that means your date will be increased only by one.

Any way try this.

real hours;
int days;
Date myDate = systemdateget();
;
hours = (timeTable.MyTime)/3600;///get total hours from your time
days = hours/24;//convert the hours into days
print days;
print myDate + days;/// add the days to your date

Hi Kranthi,

Thanks for your solution.It is working for me correctly hopefully.I asked this code for the functionality i.e.there is a date field called bid closing date and time field called interval.So while clicking the button “Apply Grace Time” this interval should be added with the bid closing date and it should display the updated date in that bid closing date field.