grep - date & time range

Hi,

I need to search email files by date & time range in email files.
The timezone is not important.

Can someone plz advise how i can do this ?

For e.g A user can specify only
[1] A single date
[2] A date range
[3] date & time range

Below is part of the email file.

Basically you need to convert the date to Julian Days for a date range or convert date/time to epoch seconds. You can do everything with epoch seconds, even though it is a tad longer. I use seconds.

Do you have perl or do you need a C example? You can do Julian Day arithmetic in shell, but that doesn't solve the date/time issue.

Please provide a perl example

can we use awk/sed to achieve this ??
:frowning:

---------- Post updated at 05:43 PM ---------- Previous update was at 03:52 PM ----------

Will the following pseudocode work ?

Yes, It works.
Thanks a lot. :slight_smile: