Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Convert a date to a day..... 1

Status
Not open for further replies.

jdespres

MIS
Aug 4, 1999
230
US
Does anyone know how to convert a date of mm/dd/yyyy to a day.

As an example: 04/23/2009 would be: Thursday

Thanks....

Joe Despres
 
Very Kool! I tried it within cygwin and it worked...

I tried it on my Solarius box and it failed...
 
As Feherke has already pointed out the date -d option was not support in Solaris however if you check the man pages for date on the Solaris system there should be an option for capturing the day of the week in either 0-6 or 1-7 numeric format.

From there you would have to apply logic that would take the numeric and give you the string you wish so 6 or 7 would return Sunday depending on which option you went with.

HTH,

SteveR77
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top