Replacing text date with mm/dd/yyyy

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • fcampion
    New User
    • Aug 2009
    • 1

    Replacing text date with mm/dd/yyyy

    Hi,
    What is the best way to write an expression to replace a date like "Feb 2, 2009" with "02/2/2009"

    I have this column labelled "Date" defined in the grammar tab.


    Thank you,

    Frank
  • Aaron
    Team Scooter
    • Oct 2007
    • 15995

    #2
    Our Data Compare can interpret dates, if you files have delimited data and a Key column.

    Otherwise in the Text Compare, you can define two date styles as Unimportant. This will mark all dates as Unimportant, however: Jan 1,2009 and 3-3-2008 would be considered as unimportant as 1-1-2009.
    Simply define two "Date" Grammars. One that matches the numeric method and one that matches your text method.
    Date=\d{1,2}/\d{1,2}\d{4}
    Date=\w{3}\s\d{1,2},\d{4}
    Then mark Date as Unimportant in your Text Compare's Session menu -> Session Settings, Importance tab.

    Here is a handy KB article with more detail:
    http://www.scootersoftware.com/suppo...mportantv3.php
    Aaron P Scooter Software

    Comment

    Working...