using awk to get specific section of lines in logs

i have a log file that has the date and time that looks like this:

Wed Jun 28 15:46:21 2012 test failed tailed passed passed not error panic

what we want to focus on is the first 5 columns because they contain the date and time.

the date and time can be anywhere on the line. in this particular case, the date and time is at the beginning of the line. my question is, what happens if it is somewhere else on that line? how can i make it so that when i run a one liner awk command, it finds the date and time wherever it is on the line?

OS: linux and sunos
shell: bash

What do you want to do with it? Output just the datim, or check for lines that contain a specified date?

the lines that contain a specified date. thank you

Like this?

awk '/([A-Z][a-z]{2} ){2}[0-9]{2} ([0-9]{2}:){2}[0-9]{2} [0-9]{4}/' infile
awk '/Wed Jun 28 15:46:21 2012/' file

or just

grep 'Wed Jun 28 15:46:21 2012' file

Neither care where the matching string is on the line.

this might be the answer. but when i run it i get nothing back

What's the data in the input file?