Audimation Services has been acquired by Caseware International Learn More.

X
Icon


Blog Image

Tech Tip: Working with Max/Min Date Fields


Maximums and minimums can give you great insight into what is going on within the data you’re working with, or within operations. If they appear outside of the norm, further research should be done on those transactions. This Tech Tip provides step-by-step instructions to determine maximum or minimum dates or times, and how to find the record for maximum date AND time.

 

How Do I Determine Maximum or Minimum Date or Time?

 

  1. APPEND FIELD: DTODAYS_DATE
    1. Type: Numeric
    2. Size: 0 decimal places
    3. Parameter: @DtoDays(DATE)
    4. Description: Number of days since 1-Jan-1900
  2. ANALYSIS – SUMMARIZATION
    1. Fields to summarize: Your Choice! MONTH for sample
    2. Numeric fields to total: DTODAYS_DATE
    3. Statistics to include: Maximum & Minimum
  3. APPEND FIELD: MIN_DATE
    1. Type: DATE
    2. Parameter: @DaysToD(DTODAYS_DATE_MIN)
    3. Description: Minimum date
  4. APPEND FIELD: MAX_DATE
    1. Type: DATE
    2. Parameter: @DaysToD(DTODAYS_DATE_MAX)
    3. Description: Maximum date

Functions for time are:

@TtoN – Converts a Time field that has values stored in Time format (HH:MM:SS) to a Numeric field with the time value converted into seconds.

@Ntot –  Converts a Numeric field containing time stored as seconds to a Time field type with a Time format (HH:MM:SS).

WAIT A MINUTE! I need to find the record for maximum date AND time.

  1. APPEND FIELD: DATE_TIME
    1. Type: Numeric
    2. Size: 5 decimal places
    3. Parameter: @Val(@Dtoc(DATE,“YYYYMMDD”) + “.” + @Replace(@Str(@Tton( TIME ),5,0),” “,“0”))
  2. ANALYSIS – SUMMARIZATION
    1. Fields to summarize: Your Choice! MONTH for sample
    2. Numeric fields to total: DATE_TIME
    3. Statistics to include: Maximum
  3. ANALYSIS – JOIN
    1. Primary database: SUMMARIZATION
    2. Secondary database: DATE_TIME DATA
    3. Match Key Fields:
      1. MONTH <-> MONTH
      2. DATE_TIME_MAX <-> DATE_TIME
    4. Matches Only


Best Practices , CaseWare IDEA , Tech Tip



Posted By

By Kris Willison
Kris joined the Professional Services team in January of 2015 as a Solutions Specialist. She has an extensive background in Software and Database Development accumulated from thirty years in IT support with twenty years’ experience in database development, cleanup, audit and migration using Microsoft Access. In her time with Audimation, she has received client praise for her “Top Tier” engagement on Monitor and Scripting projects. Kris enjoys looking at problems from new angles to determine the most efficient means of meeting the clients’ needs. Kris has been breeding/showing purebred Balinese cats since 1972 and Oriental Longhairs since 1996. She also hosts one of the largest online pedigree database sites for Siamese and related breeds with nearly 600 users worldwide.


Related Posts
Tech Tip: Duplicate Identification
Aug 28 Raw data is often incomplete, messy and inconsistent. One of the first steps in the data preparation process is the detection and removal of duplicate records. ...
Do You Know Where Your Data Is Tonight?
May 20 Challenges of Auditing in a Virtual World Welcome to our virtual world. These days, our company information, financial details, employee records, and client ...
Turn 2 Weeks of Work into 10 Minutes
Sep 27 When one of the largest privately-held oil and gas acquisition, development and production companies in the U.S. needed to provide assurance to key stakeholders...
BROWSER NOT SUPPORTED

This website has been designed for modern browsers. Please update. Update my browser now

×