User Tag List

Results 1 to 5 of 5

Thread: Calendar Between Dates or AND Operator

  1. #1
    Clicker Fusion 2.5 DeveloperSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Dec 2009
    Location
    Louisiana, USA
    Posts
    369
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Calendar Between Dates or AND Operator

    I'm trying to creation a condition to where if a date chosen is between two dates an action will happen. I have looked up and down on all the calendar options and conditions. I can't find what I'm looking for.

    One option I thought of was to create an event with an AND condition. When one creates an event I noticed that I can create OR conditions. However, is there a way to create an AND condition. That is, if x condition AND y condition is met, then whatever action takes place.

    Thanks

  2. #2
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)

    Re: Calendar Between Dates or AND Operator

    AND already exists...just add two conditions to the same event and they will both have to be true for the event to work. OR was created much later, but this multiple conditions per event feature has existed even in the earliest versions of MMF1.
    Working as fast as I can on Fusion 3

  3. #3
    Clicker Fusion 2.5 DeveloperSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Dec 2009
    Location
    Louisiana, USA
    Posts
    369
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Calendar Between Dates or AND Operator

    Thanks. I never knew that. While on the subject of the date object, I created the condition to compare, but it isn't working. I noticed in the Calendar help file it says that it must be in the ISO 8601 format. From what I see the format is YYYY-MM-dd.

    I don't need the year. I just want to compare between months. For example, if the selected dates is between April 4 (04-04) and May 1 (05-01).

    Right now I have the compare two dates like this:

    Compare dateEdittext$("A")">=""04-04"
    Compare dateEdittext$("A")"<=""05-01"

    The A is the value from the editbox. The editbox gets the date from whatever is picked on the calendar. The value in the editbox is formatted as such:

    Settext Format Date$("Calendar",Selected Date$("Calendar"), "MM-dd")

  4. #4
    Clicker Fusion 2.5 DeveloperSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Dec 2009
    Location
    Louisiana, USA
    Posts
    369
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Calendar Between Dates or AND Operator

    I've done some playing around with it and actually read the ISO 8601. Since the year is required I simply inputted whatever the year that the user selects and add that to the date the compare to.

    To help better understand I'm just doing a VERY basic program that just tells you what your Zodiac sign is. This is what I done.

    At the beginning it sets global string B to 0 (you'll see why I have this shortly) and it deactivates the group zodiac. When you click the button it sets the date you picked as a global string (A). Clicking the button also activates the zodiac group.

    For now I have just one but will finish the rest. Anyway to check for Sagittarius goes like this:

    Compare date: Alterable String A( "Edit Box" )">="Format Date$( "Calendar Object", Alterable String A( "Edit Box" ), "yyyy")+"-11-22"
    Compare date: Alterable String A( "Edit Box" )">="Format Date$( "Calendar Object", Alterable String A( "Edit Box" ), "yyyy")+"-12-21"
    Set text "Sagittarius"
    Set Global Value B to 1

    Global Value B=0
    Set text ""

    What was messing me up was not having a year or having the month/date in the correct order per ISO 8601. I set the Always condition in the beginning so that if what the user selected was not within that date range it would just give a blank.

    When I complete the program the Set text "" won't be there as it won't be necessary because one of the dates the user selects will be within the range of one of the zodiac periods.

    The more I mess around with the Expression Editor the more I love MMF2 Dev.




  5. #5
    No Products Registered

    Join Date
    Apr 2012
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    and doesn't work for me? Could this be because am using a demo version?

Similar Threads

  1. Logical NOT operator
    By SuperDisk in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 12th September 2016, 11:56 AM
  2. Or operator
    By willy in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 9th April 2012, 04:05 AM
  3. [AND] Operator
    By Nicolyto77 in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 2nd January 2009, 12:11 AM
  4. Or Operator
    By Kalnar in forum Multimedia Fusion 2 - Technical Support
    Replies: 14
    Last Post: 19th November 2007, 12:08 AM
  5. AND operator in tgf2?
    By delusan in forum The Games Factory 2 - Technical Support
    Replies: 6
    Last Post: 28th May 2007, 08:29 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •