473,325 Members | 2,816 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

calander question about getting the day of the seected date

Hi,
quick question: this, calSelect1.SelectedDate.DayOfWeek, will return the
numeric day ofthe week for a given calander called calSelect1. is there a
function or method that can give me the text value for day of the week? so
that 0 returns sunday, 1 monday, ...?
thanks
kes
Nov 19 '05 #1
3 1142
okok,
Format(calSelect1.SelectedDate, "dddd") does it, but is there a
calSelect1.SelectedDate.format("dddd") like property?

"Kurt Schroeder" wrote:
Hi,
quick question: this, calSelect1.SelectedDate.DayOfWeek, will return the
numeric day ofthe week for a given calander called calSelect1. is there a
function or method that can give me the text value for day of the week? so
that 0 returns sunday, 1 monday, ...?
thanks
kes

Nov 19 '05 #2
Hi Kurt,
I guess calSelect1.SelectedDate.DayOfWeek.ToString() should return you
"Sunday" and "Monday"
Probably it should work for you if not u can incorporate this function
in your code

private string getDayName(string strDataType)
{
string retVal=strDataType;
int nPos = retVal.IndexOf(",");
if (nPos != -1)
retVal = retVal.Substring(0,nPos);
return retVal;

}
Call it in your .cs as follows

string DayName = getDayName(myCalendar.SelectedDate.ToLongDateStrin g());

But i m sure that
string Dayname2 = myCalendar.SelectedDate.DayOfWeek.ToString();
thing should work for you rather than calling the function i mentioned use
inbuilt framework features

Hope this helps you

Thanks

IntelYogi(Yogesh)
"Kurt Schroeder" wrote:
Hi,
quick question: this, calSelect1.SelectedDate.DayOfWeek, will return the
numeric day ofthe week for a given calander called calSelect1. is there a
function or method that can give me the text value for day of the week? so
that 0 returns sunday, 1 monday, ...?
thanks
kes

Nov 19 '05 #3
you guess right..... (i hate simple answers)
thanks you
kes

"IntelYogi" wrote:
Hi Kurt,
I guess calSelect1.SelectedDate.DayOfWeek.ToString() should return you
"Sunday" and "Monday"
Probably it should work for you if not u can incorporate this function
in your code

private string getDayName(string strDataType)
{
string retVal=strDataType;
int nPos = retVal.IndexOf(",");
if (nPos != -1)
retVal = retVal.Substring(0,nPos);
return retVal;

}
Call it in your .cs as follows

string DayName = getDayName(myCalendar.SelectedDate.ToLongDateStrin g());

But i m sure that
string Dayname2 = myCalendar.SelectedDate.DayOfWeek.ToString();
thing should work for you rather than calling the function i mentioned use
inbuilt framework features

Hope this helps you

Thanks

IntelYogi(Yogesh)
"Kurt Schroeder" wrote:
Hi,
quick question: this, calSelect1.SelectedDate.DayOfWeek, will return the
numeric day ofthe week for a given calander called calSelect1. is there a
function or method that can give me the text value for day of the week? so
that 0 returns sunday, 1 monday, ...?
thanks
kes

Nov 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Michael Evanchik | last post by:
Im not getting any error messages but the event is not going off when i click the button it just posts back to the same page. I know this code has worked outside of Calanders with the same code. ...
0
by: si_owen | last post by:
Hi folks, I have a working calendar control on twp pages. one page to add events to a date, stored in database. and a second page to purely view the events in a gridview, which displays the...
4
by: remya1000 | last post by:
I'm using ASP with MSAccess as database. i have two text box and one button in my page. and i need to select dates from calander and display it in this two textbox. but i dont need to place a...
4
by: sudagnr | last post by:
Hi, a calander control should be visible when i click on image button and on selection of date on a calander control should dispaly in a text box. this should be done in client side. Can...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.