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

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

Recommended Posts

Posted (edited)

I am putting together a simple calendar and i'm having trouble scripting a button to advance my global master date field to the first day of the next month. This field will only have the date of the first of any given month.

My first idea was the following script using another field "gMain Month" that is a calc to give me the month name based on the "gMain Date" field:

If ( Calendar::gMain Month = "January" ; Calendar::gMain Date + 31 ; If ( Calendar::gMain Month = "February" ; Calendar::gMain Date + 28 ;If ( Calendar::gMain Month = "March" ; Calendar::gMain Date + 31 ; If ( Calendar::gMain Month = "April" ; Calendar::gMain Date + 30 ; If ( Calendar::gMain Month = "May" ; Calendar::gMain Date + 31 ; If ( Calendar::gMain Month = "June" ; Calendar::gMain Date + 30 ; If ( Calendar::gMain Month = "July" ; Calendar::gMain Date + 31 ; If ( Calendar::gMain Month = "August" ; Calendar::gMain Date + 31 ; If ( Calendar::gMain Month = "September" ; Calendar::gMain Date + 30 ; If ( Calendar::gMain Month = "October" ; Calendar::gMain Date + 31 ; If ( Calendar::gMain Month = "November" ; Calendar::gMain Date + 30 ; If ( Calendar::gMain Month = "December" ; Calendar::gMain Date + 31 ) ) ) ) ) ) ) ) ) ) ))

Edited by Guest
Posted

Works great...Thanks

Why is it necessary to have the words "month" and "year" in the calc? I always thought you should replace that stuff with the actual data or fields the calc is looking for but when I remove them it does not work.

Posted

Greg,

Those are Functions.

Date ()

Month()

Year()

This topic is 6472 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.