# Subtraction operator -

The subtraction operator `-` subtracts its right-hand operand from its left-hand operand.

Expression Result
- Duration Duration
- Numeric Numeric
Date - Duration Date
Numeric - Numeric Numeric
Duration - Duration Duration
Date - Date Duration
Time - Time Duration
Timestamp - Timestamp Duration
Time - Duration Time
Timestamp - Duration Timestamp

## Examples

• `-Days(7)` returns -7 days.
• `-Days(-3)` returns 3 days.
• `-4` returns -4.
• `- -5` returns 5.
• `#2013-10-01# - Days(4)` returns 9/27/2013.
• `#2013-10-01# - Hours(24)` returns 9/30/2013.
• `#2013-10-01# - Hours(20)` returns 10/01/2013.
• `30 - 5` returns 25.
• `-5 - 40` returns -45.
• `0 - 6` returns -6.
• `[Price] - [Margin]` returns cost.
• `Days(5) - Days(2)` returns 3 days.
• `Days(1) - Hours(20)` returns 4 hrs.
• `[End Date] - [Start Date]` returns the duration between the end date and start date values.
• `ToDate("3/23/2013") - ToDate("3/18/2013")` returns 5 days.
• `[End Time] - [Start Time]` returns the duration between the end time and start time values.
• `ToTimeOfDay("2:03:29 pm") - ToTimeOfDay("1:15:20 pm")` returns 48.15 mins.
• `[End Timestamp] - [Start Timestamp]` returns the duration between the end timestamp and start timestamp values.
• `ToTimestamp(#2013-09-26#, ToTimeOfDay("8:02:00 AM")) - ToTimestamp(#2013-09-20#, ToTimeOfDay("7:01:00 AM"))` returns 6.04 days.
• `[Start Time] - [Hours of Preparation]` returns the time that precedes the "Start Time" by the number of hours stored in the "Hours of Preparation" column.
• `ToTimeOfDay("10:02:00 AM") - Hours(2)` returns 8:02:00 AM.
• `[Timestamp of Publication] - [Days for Creation]` returns the timestamp that precedes the "Timestamp of Publication" by the days number stored in the "Days of Creation".
• `ToTimestamp(#2013-09-26#, ToTimeOfDay("8:02:00 AM")) - Days(2)` returns the timestamp value 9/24/2013 8:02:00 AM.