Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

Switch Year

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Switch Year

    I have a date field that only needs future dates. It should never have a year of 1999 in it.

    However, I don't seem to be able to convince Alpha of that.

    Users need to input a date range from 2010 to 2099. To save a bit of typing, I'd like them to be able to type that with a 2 digit year.

    But Alpha refuses to let that happen.

    No matter how I setup the switch year, when I type in 99, it always reverts to 1999.

    I have even tried setting the switch year to 99 and then I type in 98. It makes it 1998.

    In my testing I am starting to wonder if the switch year actually has any effect at all. Alpha seems to want to put any 2 digit year of 20 or less as 20XX and anything after 20 as 19XX.

    Is this everyone elses' experience?

    What is the purpose of the switch year if not to control what I am attempting now?

    #2
    Re: Switch Year

    Larry

    Go into View - Settings - Date and change the number in the box to whatever year you want to be the limit for the 21st Century.

    See thumbnail

    When I change the number higher than 20 (default) it reflects in the dates that I enter into a field to be in the 21st Century. I tried putting 99 in the box and went back to my test app and entered 07/23/99 and it entered 07/23/2099. Do you have the first checkbox check - that requires you to enter the year fully ie 2099?

    What version of Alpha are you using?

    Tom
    Last edited by Tbaker; 07-25-2010, 10:43 AM.

    Comment


      #3
      Re: Switch Year

      I am using the latest version of Alpha with the most up-to-date patch.

      I'm sorry I didn't make this clear:

      This is happening in a web grid and I am using MYSQL as the back-end. I am not using the standard Alpha forms.

      I changed it in the settings as you suggested and it had no effect.

      Comment


        #4
        Re: Switch Year

        Larry


        Just for the record, I shut my machine down and then came back to it. Opened Alpha V10.5 version 3032-3569 and tried to enter a date of 09/18/99 - alpha entered it with the 1999 as the year. Every date in 2000 under 2099 - alpha enters correctly as you have found out.

        I am not versed in the Web side, but I would think that the preferences for Alpha would hold for both the desktop and the web.

        I don't think it is a bug, I just think that the logic would be that 99 is too close to 2100 and Alpha holds the to 20th century years when 99 is entered into a date format.

        I think that it is just a logic error on the part of the developers.

        You could submit it as a bug.

        Maybe someone more versed in your side of development will chime in.

        Tom Baker

        Comment


          #5
          Re: Switch Year

          Larry

          I made this a new post so it would not get lost in my last post on this issue.

          I tried something which I did not think would work - I changed the year setting in the box to 00 - between year 00 and year 00. Save the preference and then went back to my test app and entered into a date field 08/18/99 and Alpha entered 08/18/2099 -

          Seems that the between function they are using (between 00 and 99) goes from 00 to 98 (excludes 99).

          It seems to be working correctly now.

          FWIW

          Tom Baker

          Again I assume that the view -settings - date preference will hold true for both sides of Alpha - desktop and web.

          Comment


            #6
            Re: Switch Year

            Unfortunately, that does not seem to be the case for me.

            I'll open a bug report and see what Alpha has to say about it.

            FYI: I created an Alpha form over the same table. The Alpha form works as you describe, the grid does not.

            Larry

            Comment


              #7
              Re: Switch Year

              Originally posted by lgrupido View Post
              I have a date field that only needs future dates. It should never have a year of 1999 in it.

              However, I don't seem to be able to convince Alpha of that.

              Users need to input a date range from 2010 to 2099. To save a bit of typing, I'd like them to be able to type that with a 2 digit year.

              But Alpha refuses to let that happen.

              No matter how I setup the switch year, when I type in 99, it always reverts to 1999.

              I have even tried setting the switch year to 99 and then I type in 98. It makes it 1998.

              In my testing I am starting to wonder if the switch year actually has any effect at all. Alpha seems to want to put any 2 digit year of 20 or less as 20XX and anything after 20 as 19XX.

              Is this everyone elses' experience?

              What is the purpose of the switch year if not to control what I am attempting now?
              the switch year that is shown in the Builder is for the client side date picker. it affects the javascript date picker.

              it has nothing to do with how dates are interpretted on the server.

              if you want to force all dates to be in the year 2000 even if they are submitted with just a 2 digit year, then you could write a canUpdateRecord event and also a canInsertRecord event to transform the dates before they are written to the database.


              for example:




              Code:
              function CanUpdateRecord as v (DataSubmitted as P, Args as p, PageVariables as p, Result as p )
              with PageVariables
              Result.Cancel = .f.
              Result.ErrorHTML = ""
              
              dim ds as c 
              ds = DataSubmitted.Date
              
              DataSubmitted.Date =iif(year(ctod(ds)) < 2000,  dtoc(addyears( ctod(ds), 100)),ds)
              
              
              end with
              end function

              Comment

              Working...
              X