The line from which this error originates has the following code:
expires = Now.AddDays(30)
It occurs irregularly and irreproducibly. The server date/time is correct and set to GMT. I've heard that it could be some curiosity to do with timezones, but that is speculative. It seems that we're some time from the year 10,000 yet, so I can't understand why adding thirty days to the current time could cause this! Culture settings perhaps?

I have to display all days base on a date range. For example my date range is "January 1, 2011" to "February 28, 2011". Now what i want is to display all the dates base on that range, what i meant about "display the dates" is like this.

I need this for 2 different changes.ON one form i got a week calendar, the other a month calendar.Was hoping to add 2 buttons previous & next.To scroll back in time x days, or x days forward.And similar for the months, but instead of days months.Can anybody give me a exaple or a method how to get this to work?Figured it could be done with a loop, but not sure anymore.

I have a date in the future e.g. 13/10/2008 I need to subtract the current date (today is the 28/09/2010) minus 7 days, so thats 21/09/2010 minus 13/10/2008, which would equal erm, 720 something ? But the current date won't always be 28/09/2010, obviously. I need the code for this. EDIT: When i said future I mean past :)

I am using the following code in the Load method of a VB form to generate random numbers in the range 1 to 8. Without fail after enough loops the range is exceeded and 9 is the random number returned every time. The line using the Rnd function is from: Rnd Function (Visual Basic)

Lets say every 7 days you manually kick off a VB.net program that moves all old files to an archive zipped folder; and you run this same code every 7 days BUT at some point in time you need to go into that zipped folder and delete every file that is 100 days old........What would you suggest I add to the code I have now, that would automatically un-zip the file (I assume I do need to unzip it first) then do the delete of the files that are 100 days old or older? I am thinking I need to set a timmer or somthing to trigger in 100 days from now then reset it once it is triggered; am I on the right track here???

I learned how to use DirectCast over the last few days and it's really helped me. However, I have a similar issue, instead of textboxes I am looking at variables that are referenced in the class.To bring you all up to speed, I have four variables, a Boolean that dictates each of the 4 players I have playing my game. [code] I would assume it'd work similar to DirectCast but I am unsure. What I came up with caused errors: [code]

im trying to make a program, basically its a time in time out, i can get the date from my database and its in three columns, the first one is the date work, next is the timein and the other one is the timeout. im trying to convert the timein and timeout into date which are string at first but i having a problem when the timeout is the next day of the actual datework for example one emplyee has datework of 1/1/2009 and he time in at 6:00PM i can convert it to date and it work be datework + " " +timein or 1/1/2009 18:00, but if i add one day to the datework so the time out is correct "1/2/2009 6:00" , it wont work T_T is there a problem in my codes? [code]

I have a datagrid in VB2008 currently set up with a column that has dates. I want to be able to calculate the number of calendar days of the Disp Date Column to today's date. Almost like the days360 formula in Excel. I cannot do it in Access as it is a linked data table and cannot do it in excel as the spreadsheet is being updated by the server throughout the day.

The program operates a board and activates relays when the buttons are pressed, the code works fine and i have published it to use on a PC however, after about 2 days the port times out and it stops operating the port, am i missing any code such as close port anywhere.

I'm trying to get, as the title says, the number of days between 2 dates. TextBox8 is set to a parsed version of the current date. The user has to enter the other date into TextBox7.Then I try to use this function that i made. The code does not work, I get an exception. I have never made a function before so I don't really know much about them. I honestly don't even know if this is possible,

I've got a really good idea for an application I want to develop and possibly try and sell online. There is one thing I have never done before, and that is disabling an application after 30 days. Let's say I want to let users try out the application for 30 days, and if they haven't bought it after that time, then the application disables itself.

I want to get number of days in a month. Here is my requirement if I am selecting month name in a combobox then I am displaying days in another combobox.Example : If I am selecting JAN in one combobox then 1 to 31 numbered bind to another combobox.If I am seleing FEB in a ombobox 1 to 28 numbers added to the combobox.I want to do this in vb.net (windows application).

I have VB 2010 Express Edition. I also have VB 6 Learning Edition. I am "dotnetizing" my pre-dot net demos. There is a VB3 demo that lists all the days in 1994 in a list box. I can select a specific date & click on a button & that date is displayed in a label.I've played around with the Date variable & I know that I can use the .now & .today & other methods. I know that I can add days to the current date. I want to be able to start on a specific date & year & list in a list box all of the dates from then until the end of the year. For example, from January 1st, 2010 thru December 31st, 2010.I know that I can choose a specific date, say, #1/1/2010# & use date.now & get a time span, but that's not what I want to do.

My table holds the following information:- ID- custID- ordered- amount- dateAddedFrom my ASP (VBScript) page I am trying to show all the rows where someone has not ordered, say in the last 30 days, 2 months, 1 year, etc. I am struggling to put the SQL statement together.

I have a DateTimePicker (dtBBDate) and a textbox(txtDBBDate) object in my form....but what i want when user change the date of dtBBDate my text box should show show the date 10 days minus from that selected date i.e. if user select 10 may text box should show me 1st may?

We have a system were a user chooses a combination of days from a calander. We then insert a values in the databse based on the following [code]So if they picked Monday and Friday we would insert 34, or if they picked Monday,Tuesday and Thursday we would insert 22.Now my question is how do I reverse this easily in code, to find out what days they have picked. So I get fed 22 from the database how do I figure out what combination of days make up that value. The only thing I can think of is creating the mother of all case statements but I know there must be a better way.

all you clever people out there I'm rather new to this and I'm using vb.net in visual studio 2005 and I want to add 20 WORKING days to the TODAY() value. I'm able to add the days, but it also adds NON-WORKING days.