0

Date and time

I have a field with a date/time value.. called Departure and i have anumber filed "Traveltime in min" now i want to add the minutes to the departuretime..

 

time(departure+'traveltime in min') but it is not working ??

 

Henrik

1 reply

null
    • Fred
    • 2 yrs ago
    • Reported - view

    Hi Henrik -

     

    If you are not aware that Ninox uses miliseconds since the Unix epoch to do all datetime calculations. So to add time to a date/time field you have to take the data in your 'Traveltime in min' field, which is probably in human readable form of a positive integer, and multiply it by 60000 for min or 3600000 for hours. So you code would look something like:

     

    time(departure+'traveltime in min'*60000)

     

    I hope this helps. Let us know how it goes.