Filtering - Using the FIND and WHERE function on date columns

  • The main use of a Find or Where function is to select records that meet a specified criterion. The functions can be used to request records where a certain field is equal to, less than, greater than or in between two values.

  • You have probably used these functions before to search for Strings or Integers, e.g. Customer Name = ‘Smith’ or Customer Spend > 100, but if the column holds a list of dates, you must convert your search expression to a date also. To do this, you add ‘cdate’ in front of the specified date.

  • ‘Cdate’ converts what you type between the single quotes into a date data type which can be recognized by InSite.

MASTER.DATE = cdate('11Feb2023')

  • This expression will look for any records in the browse which display 11Feb2019, within the DATE column

MASTER.DATE < cdate('11Feb2021')

  • This expression will look for any records in the browse which display 11Feb2019 or any date before then, within the DATE column

MASTER.DATE < cdate('31Dec2018') and MASTER.DATE > cdate('01Jan2020')

  • This expression will look for any records in the browse which are between 01Jan2020 and 31Dec2018.

Note: The format you enter the date must match one that is recognisable as a date by InSite.

Examples of acceptable date formats

  • ‘16-December-2024’

  • ‘16Dec2024’

  • ‘16/12/24’

  • ‘16 Dec 24’

  • ‘16122024’

Examples of unacceptable date formats

  • ’16.12.24’

  • ‘16th December 2024’

  • ‘161224’

Last updated