Script To read Date and count from files

Smaple 1

Date and Time: 2013-05-11 12:23:12 MST
abc,1234,hi-all,45354-88888,IN,US
XYZ,1234,hi-all,45354-88888,OUT,GB
abc,1234,hi-all,45354-88888,IN,AS
abc,1234,hi-all,45354-88888,OUT,US
abc,1234,hi-all,45354-88888,IN,US
Number of Records: 000005

Sample 2

HDR: 20130511
abc,1234,hi-all,45354-88888,IN,US
XYZ,1234,hi-all,45354-88888,OUT,GB
abc,1234,hi-all,45354-88888,IN,AS
abc,1234,hi-all,45354-88888,OUT,US
abc,1234,hi-all,45354-88888,IN,US
TRL: 000005

Let suppose if I have these two formats of file. And need two get only date from the first line and the counts of record from the last line. And in sample 2 the date format should be 2013-05-11. I can get any of the file.
Can some help me with a shell script for this. I will be highly thank full.

$ awk '/Date and Time/{print $4,$5}/Number of Records/{print $NF}' file1
2013-05-11 12:23:12
000005
$ awk '/HDR/{$2=substr($2,1,4) "-" substr($2,5,2) "-" substr($2,7)}1' file2
HDR: 2013-05-11
abc,1234,hi-all,45354-88888,IN,US
XYZ,1234,hi-all,45354-88888,OUT,GB
abc,1234,hi-all,45354-88888,IN,AS
abc,1234,hi-all,45354-88888,OUT,US
abc,1234,hi-all,45354-88888,IN,US
TRL: 000005