August 26, 200322 yr Hi, I have a date field (type:date name:currentdate) with a date in it (what a suprise:) Now I only want to change the month with a script. So I have been busy writing some scripts that searches in the datefield to the current monthnumber and replace it with an increment value like 1. So when the month is 8, it replaces it with 9. But it seems that there is something terribly wrong with this set field calc...maybe someone wants to take a look on it? Replace(currentdate, Position(currentdate, "-", "1", 1), "2", CurrentMonthNumber + 1) any help is welcome:) greetz, Jeffer
August 26, 200322 yr Try Date(Month(currentdate)+1, Day(currentdate), Year(currentdate))-(Day(currentdate) <> Day(Date(Month(currentdate)+1, Day(currentdate), Year(currentdate)))) Dj
August 26, 200322 yr hi Lee, In case of date 08-31-2003, for example, this would produce 10-01-2003. That's why I've added the day check in formula. Dj
August 26, 200322 yr You are correct of course. I was zeroing in on the month. That will teach me to answer any questions until I have my second cup of coffee. Hey, there is a good idea for an Icon (Coffee Cup). One cup with a line through it represents no coffee yet, beware of the answer. One Cup no line would indicate person may be awake, but some caution should be taken in using answers. Two Cups would indicate that the person should be hitting on all cylinders now, advice can be look at as reliable.
August 26, 200322 yr Author Hi guys...thnx for the reply's! I was looking in the complete wrong direction:( greetz, jeffer ps. like the coffee cup idea;)
Create an account or sign in to comment