Welcome, Guest. Please Login or Register.
eccoMAGIC Forums
05/22/22 at 15:07:46
Home Help Search Login Register


Pages: 1
Send Topic Print
  Rating
Rate:
Rating:
Rating: 7.00
Votes: 1

5
4
3
2
1







1




5
4
3
2
1


1


2


3


4


5


6


7


8


9


10

Getting Started Tutorial on dates (Popularity: 3128 )
Admin
Administrator
*****


I love Ecco!

Posts: 127
Show the link to this post Getting Started Tutorial on dates
03/06/08 at 14:14:40
 

In many cases,  you can put a simple expression into a date folder to capture dates included in item text:
 
get_contain_date()
 
 
but that doesn't work so well with 'special cases'  (such as Paypal transaction lists),  
 
and,  that doesn't help us understand how to TAKE CONTROL OF THE SLANG RULES.
 
 
 
so...
 
here are two simple functions that I use,
 
and a brief tutorial about what's going on.
 
Quote:
++:+!:{3} + imatch("JAN01FEB02MAR03APR04MAY05JUN06JUL07AUG08SEP09OCT10NOV11DEC12",left({1},3
) + "(\d+)")
+ right("0" + {2},2):ITT ~= "^\s*([A-Za-z]+)\.?\s+(\d+),\s*(\d+)"

 
 
Quote:
++:!+: replace({1},"(\d\d)/(\d\d)/(\d\d\d\d)","$3$1$2",1):ITT ~= "^[^\d]*([\d/]+)"

 
 
In the first example we use a TABLE LOOKUP to convert a month (jan, january, etc.) to a numerica value 1-12.
 
that value is then sequenced after the year, and before the date (padded with 0).
 
 
 
In the second example,  we grab the first instance of numbers slashes, and then use the replace function to change the order (and remove the slashes)  to place in ecco 'date' format to be used in date folders.
 
 
 
 
Still confused ?
 
Ask,  and your questions will be answered !
 
Back to top
 
 

The Administrator.
WWW   IP Logged
Admin
Administrator
*****


I love Ecco!

Posts: 127
Show the link to this post Re: Getting Started Tutorial on dates
Reply #1 - 02/12/17 at 16:28:10
 

The expression also works to compute dates (in ecco date ready format)...
 
for example,  
 
    get_contain_date(Today - 33)
 
 
which will give you the date, 33 days ago....
 
 Shocked
Back to top
 
 

The Administrator.
WWW   IP Logged
Pages: 1
Send Topic Print