Match day of week to a date

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, MudGuard

Post Reply
ParaicMcK
Posts: 1
Joined: Mon Nov 12, 2007 2:50 pm

Match day of week to a date

Post by ParaicMcK »

I've been using Textpad for a while but haven't really progressed beyond search / replace & basic key-stroke macros. I would really appreciate some help with this....

I have a long journal document with dates formatted as dd/mm/yy (all numerics). Is there a way of searching for the day of week to match with this (e.g. 'Monday', 'Thursday') & adding this after the date?

I've thought of importing a list of matching dates /days from excel but don't know how then to match them to the document.

Thanks
User avatar
MudGuard
Posts: 1295
Joined: Sun Mar 02, 2003 10:15 pm
Location: Munich, Germany
Contact:

Post by MudGuard »

I don't think this is possible with textpad.

A perl (or other scripting language) script should not be too hard to write (apart from the problem which century your dates belong to, as you only seem to have 2 digits for the year) ...
bveldkamp

Post by bveldkamp »

Another starting point would be the 'date' util from http://unxutils.sourceforge.net. You can add a tool in TP that calls date.exe --date=$Sel +%A, this will put the weekday on the tool output window. Still not exactly what you want I guess, but it's a start.
Post Reply