Convert text to time, and do calculation

Hi,

I do not see the second part of the question in your first post :?

Unfortunately, the RelativeDate() function works only with the days, not with the fractions of day.

What you could do is:

  • Convert the [old time] date to a number of hours from some point in the past (let’s say from Jan 1 of this year or even earlier if it’s needed)
  • Then subtract 5 hours from this number
  • And convert the result back to date, that will be [NewTime]

Something similar (getting the difference between 2 dates) was discussed here:

It may help you to get an idea.


Marek Chladny :slovakia: (BOB member since 2003-11-27)