Here is a sample record from a data file
Ram|2015-03-01|204012|||inact|2014-02-01|
There are hundreds of such records. I want to retrieve the first date field from the first record. I tried using grep but it prints the entire line.
Output should be:
2015-03-01