2 Replies Latest reply on Apr 17, 2015 8:31 AM by Timothy Bentley

    Operations on date from list can result in a number

    Timothy Bentley

      Summary

      Operations on date from list can result in a number

      Product

      FileMaker Pro

      Version

      13.0v5

      Operating system version

      Windows 7

      Description of the issue

      When extracting a date from a list and adding/subtracting a number, the result is a number.

      I'm not sure this is really a bug, maybe just expecting too much of FileMaker's typecasting.

      Steps to reproduce the problem

      1. Enter a date (4/17/2015) into YourTable::DateField.
      2. Enter these expressions in the data viewer:
      YourTable::DateField
      YourTable::DateField - 1
      GetValue(List(YourTable::DateField); 1) (or LeftValues)
      GetValue(List(YourTable::DateField); 1) - 1
      GetAsDate(GetValue(List(YourTable::DateField); 1)) - 1

      Expected result

      All expressions produce a date: 4/17/2015 or 4/16/2015.

      Actual result

      GetValue(List(YourTable::DateField)) - 1 produces 4172014. Note that "4/17/2015" - 1 produces the same result.

      Workaround

      Use GetAsDate