If you have a comment on this topic, contact Aptify Documentation. If you want to return to the Aptify Community Site, please click here.

Filtering Orders Based on Date Shipped Field

In Aptify, unless you specify a value in the Date Shipped field, the system automatically inserts the current date and time into this field when you ship an order. While including the time in the Date Shipped field provides more information for customer service purposes, users should note that any view configured to display Orders whose Date Shipped equals a particular day without considering the time will only return orders that shipped at exactly midnight on the specified day. For example, if you create a filter statement for orders that shipped on 7/18/20xx, the system will interpret this value as 7/18/20xx 12:00AM. Therefore, orders that were shipped on that date will not appear in the view since they were shipped after midnight.

This topic describes two methods for designing filter statements based on the Date Shipped field. 


The following steps show how to implement both methods for a prompted view:

Filtering Orders On or Before a Specified Date

Follow these steps to create a prompted view that returns all orders that shipped on or before a specified date:

  1. Open a new view from the Orders service.
  2. Click the Filters tab.
  3. Select Date Shipped for the Field and <= (less than or equal to) for the Operator.
  4. Click Show Advanced and then click Prompt Wizard.
  5. Using the default settings, follow the on-screen instructions to complete the Prompt -wizard.
  6. Click inside the Value field and drag the cursor to the right until you reach the end of the prompt string.
  7. Place "23:59:59.999" at the end of the prompt string. Be sure to leave a space between the ">" and the "2".


     
  8. Click OK to load the view.
  9. Enter a date in the prompt and click OK.

The orders shipped on or before the date you specified should appear in the view. Note that an advanced user could also have appended the "23:59:59.999" time directly to the end filter statement on the Advanced (SQL) tab rather than modify the text in the filter's Value field.

Filtering Orders Based on a Particular Date

Follow these steps to create a view that returns the orders that shipped on a particular date:

  1. Open a new view from the Orders service.
  2. Click the Advanced (SQL) tab.
  3. At the end of the current SQL statement, enter the following WHERE clause:
    • WHERE CONVERT(DATETIME, CONVERT(NVARCHAR, ShipDate,[Style])) =CONVERT(DATETIME, CONVERT(NVARCHAR,'<PROMPT DEFAULT={}CONTROLTYPE={TEXT}>ShipDate=</PROMPT>',[Style]))
  4. In place of [Style], enter the date style designation for your regional settings. For example, a value of 101 corresponds to the standard US format of mm/dd/yyyy (as shown in the figure below) and 103 corresponds to the British format of dd/mm/yy.


     
  5. Click OK to load the view.
  6. Enter a date in the prompt and click OK. The orders shipped on the date you specified should appear in the view (regardless of the time at which they were shipped on that date).

Copyright © 2014-2017 Aptify - Confidential and Proprietary