Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • 1
    Welcome to U&L, please take the tour to see how to ask good questions. As a rule you need to include samples of your input files, the code you have tried, the output you got and the output you want. If you update your question with these then people will be able to give better help so ... please add this detail. Commented Jul 3, 2020 at 7:35
  • Read man date, and use the --date= and --format= options to convert both dates to "seconds since the epoch". Commented Jul 3, 2020 at 14:54
  • @waltinator, what version of date has a --format option? Commented Jul 3, 2020 at 17:45
  • As bu5hman says: (1) Show samples of your input files. Is file1 20 characters long (e.g., 2017-01-01 12:00:00 and a newline, and nothing else)? Is file2 14 characters long (e.g., 20170101 1200 and a newline, and nothing else)? If not, you haven't shown us samples of your input files.  (2) Show what output you want/expect.  (3) Show us your MATLAB script. (P.S. Does it work the way you want?)  (4) Try to do this in a shell script, and show us your best attempt. … … … … … … … … … … … … … Please do not respond in comments; edit your question to make it clearer and more complete. Commented Jul 4, 2020 at 0:33