on 01-08-2015 12:17 AM
Hello all,
I need to subtract 15 minutes from a departure time. if my flight departs at 07:00 I need it to show a boarding time of 06:45. Below are the two formulas that I can use. I need to show both the departure time and boarding time on my form.
------------------------------------------------------------------------------
forumual 1 time field.
whileprintingrecords;
stringvar tm := "";
stringvar tntdept := "";
tm := fos2time({TRIP_LEGS.ETD - local});
--------------------------------------------------------------------------------
formula 2 date and time field.
whileprintingrecords;
stringvar dt := "";
stringvar tm := "";
stringvar tntdept := "";
if not isnull({TRIP_LEGS.Depart Date - Local}) and {TRIP_LEGS.Depart Date - Local} <> 0 then
(
dt := uppercase(totext(fos2date({TRIP_LEGS.Depart Date - Local}),"ddd dd MMM yyyy"));
tm := fos2time({TRIP_LEGS.ETD - local});
if {TRIP_LEGS.ETD Tentative} = 1 then tntdept := " ?" else tntdept := " ";
)
else
"";
dt + space(4) + tm + tntdept;
--------------------------------------------------------------------------------------------
Any help would be great.
Thanks
Bill
Hi,
Try Using Below Formula.
DateAdd('n', -15, {DateField})
A DateTime value.
Interval type value | Description |
---|---|
yyyy | Extracts the year |
q | Quarter (the result is 1, 2, 3 or 4) |
m | Month (the result is from 1 to 12) |
y | Day of year (1 to 365 or 366 in a leap year) |
d | Day part of the date (1 to 31) |
w | Day of week (1 to 7 with the result depending on firstDayOfWeek) |
ww | Week of year (1 to 53 with firstDayOfWeek and firstWeekOfYear determining the exact days of the first calendar week of the year) |
h | Extracts the hour part of the given DateTime (0 to 23) |
n | Minute part (0 to 59) |
s | Second part (0 to 59) |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.