473,568 Members | 2,986 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

calander question about getting the day of the seected date

Hi,
quick question: this, calSelect1.Sele ctedDate.DayOfW eek, 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 1150
okok,
Format(calSelec t1.SelectedDate , "dddd") does it, but is there a
calSelect1.Sele ctedDate.format ("dddd") like property?

"Kurt Schroeder" wrote:
Hi,
quick question: this, calSelect1.Sele ctedDate.DayOfW eek, 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.Sele ctedDate.DayOfW eek.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(stri ng strDataType)
{
string retVal=strDataT ype;
int nPos = retVal.IndexOf( ",");
if (nPos != -1)
retVal = retVal.Substrin g(0,nPos);
return retVal;

}
Call it in your .cs as follows

string DayName = getDayName(myCa lendar.Selected Date.ToLongDate String());

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

Hope this helps you

Thanks

IntelYogi(Yoges h)
"Kurt Schroeder" wrote:
Hi,
quick question: this, calSelect1.Sele ctedDate.DayOfW eek, 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.Sele ctedDate.DayOfW eek.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(stri ng strDataType)
{
string retVal=strDataT ype;
int nPos = retVal.IndexOf( ",");
if (nPos != -1)
retVal = retVal.Substrin g(0,nPos);
return retVal;

}
Call it in your .cs as follows

string DayName = getDayName(myCa lendar.Selected Date.ToLongDate String());

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

Hope this helps you

Thanks

IntelYogi(Yoges h)
"Kurt Schroeder" wrote:
Hi,
quick question: this, calSelect1.Sele ctedDate.DayOfW eek, 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
3850
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. Anyone have any ideas? While rdz.Read() lb(rdz("id")) = New Button lb(rdz("id")).ID = "lb" & rdz("id") lb(rdz("id")).Text = rdz("lloyds_num")...
0
886
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 events for the day selected from the calendar. However i am looking to allow multiple date selection, from what i have seen only single day or whole...
4
2642
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 calander all the time in my page.b'coz its taking lots of space. so what i need is that while pressing the button or while moving the cursor on top of...
4
1116
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 any one post me the code.. Thanks, Sudagnr.
0
8118
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7665
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7962
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6277
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5217
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3651
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3631
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1207
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
933
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.