Connecting Tech Pros Worldwide Help | Site Map
Reply
 
LinkBack Thread Tools Search this Thread
  #1  
Old September 5th, 2008, 05:24 PM
Newbie
 
Join Date: Sep 2008
Posts: 9
Default QUESTION: How to change DayOfWeek to Numerical value?

Hi Guys,

I need help to understand as posted in the topic.

Dim dteResults as Date = Now

MessageBox.Show(dteResults.DayOfWeek.ToString,"Day of Week")

It will show Thursday or whatever Now.

How can you show is as a number? Like let's say friday=5.

Thanks,
Reply
  #2  
Old September 5th, 2008, 11:13 PM
kadghar's Avatar
Expert
 
Join Date: Apr 2007
Location: Mexico City
Age: 25
Posts: 1,084
Default

im not quite sure...

as long as i can see you're using VB 2005 or newer. But why dont you check if the WEEKDAY function still aviable?
Reply
  #3  
Old September 6th, 2008, 08:23 AM
QVeen72's Avatar
Moderator
 
Join Date: Oct 2006
Location: Bangalore
Posts: 1,334
Default

Hi,

Remove .ToString, you will get Numeric Value:

MessageBox.Show(dteResults.DayOfWeek , "Day of Week")

Regards
Veena
Reply
  #4  
Old September 8th, 2008, 06:41 PM
Newbie
 
Join Date: Sep 2008
Posts: 9
Default

Quote:
Originally Posted by QVeen72
Hi,

Remove .ToString, you will get Numeric Value:

MessageBox.Show(dteResults.DayOfWeek , "Day of Week")

Regards
Veena
There was an error. Do you know about System.DayOfWeek? It show the numeric value of the said dayofweek.

Thanks,
Reply
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 205,248 network members.