Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 7763 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

Posted

Try

Date(Month(currentdate)+1, Day(currentdate), Year(currentdate))-(Day(currentdate) <> Day(Date(Month(currentdate)+1, Day(currentdate), Year(currentdate))))

Dj

Posted

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

Posted

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.

smile.gif

This topic is 7763 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.