Replace Pioneer Home
All Examples
Free Download
all
Advanced search and replace
Replace text in multiple files
Regular expression replace
Batch file rename
Batch download
Text file parser
Text file splitter
Html text generator
Search replace binary
Random word generator
Count and statistics
Character encoding
Bin Hex Oct Dec converter
Text generator
Text sort
Text merge
Text data calculation
RSS: Replace Pioneer Examples
836.Advanced search and replace -- How to calculate the number of days between every two adjacent dates?
User:
editor -- 2011-08-11
<< 835
837 >>
Hits:
3193
Type:
Advanced search and replace
Search all
Advanced search and replace
examples
Description:
How to calculate the number of days between every two adjacent dates in the list?
Input Sample:
2010-09-09:04:55:06
2010-09-10:17:25:33
2011-07-15:12:33:40
2011-08-06:13:12:05
Output Sample:
Number of days:
1.52
307.80
22.03
Answer:
Hint: You need to
Download and install "Replace Pioneer"
on windows platform to finish following steps.
1. ctrl-o open the text file that contains dates
2. ctrl-h open 'replace' dialog
* set 'replace unit' to 'Line'
* set 'replace with pattern' to:
scalar($previous?calc(difftime($match,$previous)/3600/24,'.2f'):'Number of days')\n
3. click 'Replace', done.
Screenshot 1: Replace_Window
Similar Examples:
How to calculate time difference of two adjacent and matched lines?
(64%)
How to add the numbers together in every 2 adjacent lines in text file?
(61%)
How to calculate the summaries of every line in a txt file?
(57%)
How to insert a space or underscore between every 2 words in filenames?
(56%)
How to insert a space between every 80 characters?
(56%)
How to convert all numbers from decimal to percentage?
(55%)
How to calculate sum value of every column?
(55%)
How to calculate summary of every column in a text file?
(55%)
Check Demo of
Advanced search and replace
Keywords:
600
adjacent
previous
scalar
day
calculate
two
contains
calcu
calculat
contains number
search calculate replace
search replace calculate
text number list
two text
text between pattern
search and replace between
search between