Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

464.Advanced search and replace -- How to convert the date in a text file into GMT(Greenwich Mean Time)?

User: editor -- 2010-04-01          << 463  465 >>
Hits: 1750
Type: Advanced search and replace   
Search all Advanced search and replace examples
Description:
How to convert the date in a text file into GMT(Greenwich Mean Time)?
Input Sample:
- [27/Mar/2010:01:56:50 -0700] 
- [27/Mar/2010:01:57:02 -0700] 
- [27/Mar/2010:05:57:44 -0700] 
- [10/Mar/2010:14:47:37 -0800] 
- [10/Mar/2010:14:47:48 -0800] 
Output Sample:
- [10-03-27 08:56:50 GMT] 
- [10-03-27 08:57:02 GMT] 
- [10-03-27 12:57:44 GMT] 
- [10-03-10 22:47:37 GMT] 
- [10-03-10 22:47:48 GMT] 
Answer:
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
1. ctrl-o to open source text file
2. ctrl-h open 'replace' dialog
* in 'search for pattern', enter:

* in 'replace with pattern', enter:

3. click 'Replace', done!
4. ctrl-s save to file.

Note:
format \d\d/\w\w\w/\d\d\d\d:\d\d:\d\d:\d\d -\d\d\d\d is to match the date like "27/Mar/2010:01:56:50 -0700"

You can also change to local time by using formmattime() function.

Refer to following link for all functions definition:

http://www.mind-pioneer.com/replace/help/Functions.html
Download Script:  scripts/464.rst.zip

Screenshot 1:  Replace_Window


Similar Examples:
How to convert IP addresses in text file into Hexidecimal format? (62%)
How to convert binary data in many text file to hexdecimal data? (60%)
How to create a text file by choosing N random lines from each of many files? (56%)
How to convert Hexidecimal IP addresses in text file into decimal format? (56%)
How to convert many html files to text files with "fast replace" function? (56%)
How to convert each line of a text file to the new format? (54%)
How to sort all the lines of a text file randomly? (54%)
How to convert database file into "|" delimitered file? (54%)

Check Demo of Advanced search and replace
Keywords:
ddd  green  definition  functions  formattime  refer  help  link  function  100  convert date text  convert date to search  replace convert date  convert date  date convert  functions replace  date and time  date time