Jump to content

  • Log in with Facebook Log in with Twitter Log In with Google      Sign In   
  • Create Account

Subscribe to HRA Now!

 



SEO Class in Chicago, IL

Learn How To Optimize Your Website on July 26, 2013


Looking for personalized in-depth SEO training among your peers?



High Rankings is offering a 1-day customized SEO training class in Chicago. Class size is limited so please sign-up now if you want in!



 


Are you a Google Analytics enthusiast?

Share and download Custom Google Analytics Reports, dashboards and advanced segments--for FREE! 

 



 

 www.CustomReportSharing.com 

From the folks who brought you High Rankings!



Photo
- - - - -

Date Detection


  • Please log in to reply
2 replies to this topic

#1 thx1138

thx1138

    HR 4

  • Active Members
  • PipPipPipPip
  • 220 posts
  • Location:England

Posted 30 October 2004 - 10:52 AM

Hi,

On our order form the user has to select their desired delivery date by choosing from drop down menus the day of the month, e.g. 23 and the Month, e.g. November.

Is there a formula that will take these two inputs along with taking the current year from the server to work out if the selected date, e.g. 10 October is a Sunday?

Any help would be appreciated,

Charlie

#2 chrishirst

chrishirst

    A not so moderate moderator.

  • Moderator
  • 5,888 posts
  • Location:Blackpool UK

Posted 30 October 2004 - 12:14 PM

as you don't say what server-side code

ASP;
CODE
function DayName(intDay,intMonth,intYear)
DayName = weekdayname(weekday(intDay & "/" & intMonth & "/" & intYear))
end function


(reorder the date parts in the concatenation to suit country)

PHP;
CODE
function DayName($intDay,$intMonth,$intYear) {
$dayarray = getdate(strtotime( $intMonth . '/' . $intDay . '/' . $intYear));
$strDayName = $dayarray["weekday"];
return $strDayName;
}


useage for both
CODE
DayName(30,10,2004)


#3 thx1138

thx1138

    HR 4

  • Active Members
  • PipPipPipPip
  • 220 posts
  • Location:England

Posted 06 December 2004 - 06:26 AM

Ouch! Sorry if I've appeared to ignore your reply Chris, I'd forgotten that I'd posted this question to this forum, it wasn't until I just went through my old posts that I remembered it. Whip.gif

Anyway, belated thanks for your help, excellent as usual.

Charlie embarrassed.gif




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users