Announcement

Collapse
No announcement yet.

Replacing text date with mm/dd/yyyy

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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

  • #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:
    Beyond Compare is a multi-platform utility that combines directory compare and file compare functions in one package. Use it to manage source code, keep directories in sync, compare program output, etc.
    Aaron P Scooter Software

    Comment

    Working...
    X