uvedese Contributor
Joined: 21 Jan 2006 Posts: 169 Location: Spain
|
Posted: Fri Sep 02, 2011 11:34 am Post subject: |
|
|
Hi DoT_PiTcH:
First you must separate the different arguments:
Code: | %1 = "device_20110818163025.avi"
%%year = @substr(%1,8,11)
%%month = @substr(%1,12,13)
%%day = @substr(%1,14,15)
%%hour = @substr(%1,16,17)
%%minute = @substr(%1,18,19)
%%second = @substr(%1,20,21) |
Second, You must use the internal format that uses the @datetime() function to manage the time.
Actually, for your purposes, we need only the variables %%year, %%month and %%day:
Code: | %a = @datetime(,%%month/%%day/%%year) |
The difference between consecutive days is 1, for example:
Code: | %a = @datetime(,01/01/2011)
%b = @datetime(,01/02/2011)
info @diff(%b,%a) |
Finally, using the current date and separating the arguments of the different files, we can get to know the days that have passed on to today:
Code: | option decimalsep,.
%1 = "device_20110818163025.avi"
%%year = @substr(%1,8,11)
%%month = @substr(%1,12,13)
%%day = @substr(%1,14,15)
%%today = @fint(@datetime())
%2 = @datetime(,%%month/%%day/%%year)
info @diff(%%today,%2) |
I hope it help you
_______________
uVeDeSe
_______________ |
|