Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi:

 

Im wondering if anyone here knows how to calculate dates? For example, if a user using a datetimepicker, chooses a

 

I have an ending date and staring date of a week.

A user uses a datetimepicker to pick a date (they may pick any date).

I want the application to be able to calculate which week the user has picked (that procedure is fine), and for that week the first day of the week and the last date.

 

I believe in VBA its something like

 

Dim dateTemp as Date

 

Do Until DatePart ("w", dateTemp) = vbSaturday

dateTemp = dateTemp - 1

 

In vb.net you cannot mix integer with dates to calculate. How to do this?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...