Jun 29, 2006 #1 vttech Technical User Jan 28, 2006 297 US is their a function that I can use to get the day of week based on a date? Example: I input 6/29/2006 and it would say Thursday NameOfFunction(6/29/2006) If not how would I go about creating such a function?? Newbie in search of knowledge
is their a function that I can use to get the day of week based on a date? Example: I input 6/29/2006 and it would say Thursday NameOfFunction(6/29/2006) If not how would I go about creating such a function?? Newbie in search of knowledge
Jun 29, 2006 1 #2 PHV MIS Nov 8, 2002 53,708 FR Format(#6/29/2006#,"dddd") Hope This Helps, PH. Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886 Upvote 0 Downvote
Format(#6/29/2006#,"dddd") Hope This Helps, PH. Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
Jun 29, 2006 Thread starter #3 vttech Technical User Jan 28, 2006 297 US I tried Code: weekday(6/29/2006) but it produced 7 which stands for Saturday but when I put Code: weekday(6/29/2006,vbTuesday) it gives me 5 which stands for Thursday what can I put in the second argument that it automatically gives be the correct day without editing the code each year? Newbie in search of knowledge Upvote 0 Downvote
I tried Code: weekday(6/29/2006) but it produced 7 which stands for Saturday but when I put Code: weekday(6/29/2006,vbTuesday) it gives me 5 which stands for Thursday what can I put in the second argument that it automatically gives be the correct day without editing the code each year? Newbie in search of knowledge
Jun 29, 2006 #4 PHV MIS Nov 8, 2002 53,708 FR Have you tried my suggestion ? Hope This Helps, PH. Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886 Upvote 0 Downvote
Have you tried my suggestion ? Hope This Helps, PH. Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
Jun 29, 2006 Thread starter #5 vttech Technical User Jan 28, 2006 297 US PHV thanks that worked we posted at the same time thus I missed your idea Newbie in search of knowledge Upvote 0 Downvote
PHV thanks that worked we posted at the same time thus I missed your idea Newbie in search of knowledge
Jul 2, 2006 #6 Golom Programmer Sep 1, 2003 5,595 CA The syntax Code: weekday(6/29/2006,vbTuesday) Tells the system that Tuesday is the first day of the week so the numbering then becomes 1 = Tuesday 2 = Wednesday : 5 = Saturday 6 = Sunday 7 = Monday The default for the second argument is vbSunday with the numbering 0 = Sunday 1 = Monday : 6 = Friday 7 = Saturday Unless you have good reason for changing the day on which a week starts, just omit the second argument. Upvote 0 Downvote
The syntax Code: weekday(6/29/2006,vbTuesday) Tells the system that Tuesday is the first day of the week so the numbering then becomes 1 = Tuesday 2 = Wednesday : 5 = Saturday 6 = Sunday 7 = Monday The default for the second argument is vbSunday with the numbering 0 = Sunday 1 = Monday : 6 = Friday 7 = Saturday Unless you have good reason for changing the day on which a week starts, just omit the second argument.