how to use WGET command to get today's date?

I need to get the current date off a remote site, such as Google or Yahoo.
Does anyone know how to use the wget command on a Solaris 10 system to do this? I recall a long time ago, where using "wget" will get a bunch of info off a site, and then, you can extract the date from all of that info.

This is what I tried, and it doesn't work:

/usr/sfw/bin/wget yahoo dot com (I can't paste the link here)

wget --server-response  --spider http://www.yahoo.com 
--09:51:03--  http://www.yahoo.com/
           => `index.html.1'
Resolving www.yahoo.com... 87.248.122.122, 87.248.112.181
Connecting to www.yahoo.com|87.248.122.122|:80... connected.
HTTP request sent, awaiting response... 
  HTTP/1.0 302 Found
  Date: Thu, 21 Apr 2011 07:51:03 GMT
  P3P: policyref="http://info.yahoo.com/w3c/p3p.xml", CP="CAO DSP COR CUR ADM DEV TAI PSA PSD IVAi IVDi CONi TELo OTPi OUR DELi SAMi OTRi UNRi PUBi IND PHY ONL UNI PUR FIN COM NAV INT DEM CNT STA POL HEA PRE LOC GOV"
  Cache-Control: private
  Set-Cookie: IU=deleted; expires=Wed, 21-Apr-2010 07:51:02 GMT; path=/; domain=.yahoo.com
  Set-Cookie: fpc=d=QYjtE9OdzrgTsvj2ZSHAEUysiGpvBxV3CwVfI_Hd9MLrnBm4W85EufcBK1Pt7LShjT_IohviXXHc_cajJZpV8_0Ecz8Dtdau57X4D40rdTyFKdkwZM4Xj82uYBAUy6Xmf.P5jmvFf90OF8CkKYEgSge.kGeJo7dVkxgCis_dTY82tv8dmuB3cBQIf5ByexRUht39qyk-&v=2; expires=Fri, 20-Apr-2012 07:51:03 GMT; path=/; domain=www.yahoo.com
  Location: http://de.yahoo.com/?p=us
.......

i think curl may do that better, at least without so many overheads.

curl --head http://yahoo.com
HTTP/1.1 301 Moved Permanently
Date: Thu, 21 Apr 2011 07:52:39 GMT
Location: http://www.yahoo.com/
Vary: Accept-Encoding
Content-Type: text/html; charset=utf-8
Cache-Control: private
Age: 0
Connection: keep-alive
Server: YTS/1.20.0

Thanks for your response. This is what I see when I run the wget command on my Solaris 10 system. It's linked to a network that has Internet access.

--10:22:21-- Yahoo! Ireland
=> `index.html'
Resolving www.yahoo.com... failed: node name or service name not known.

How do I configure my Solaris 10 so that it can use wget to communicate to the outside world? Thanks.

It's not wget that's having problems. Your system can't look up domain names. What's in /etc/resolv.conf ?

That file doesn't even exist.

Can you ping an ip address?

ping 66.82.4.8

I am closing this thread as the OP has opened another thread on their network connection issue.

See how to link x86 Solaris 10 system to the Internet?