New call-to-action
Results 1 to 4 of 4

Thread: Default date translation is now using 1920 as the year instead of 2020

  1. #1
    Member 411tech's Avatar
    Real Name
    Barry Kucher
    Join Date
    Jul 2006
    Posts
    202

    Default Default date translation is now using 1920 as the year instead of 2020

    Starting 1/1/2020 if you have an older website, dates might not work correctly anymore. You most likely left the default action for Date Translation for 2 year dates to end in 2020. If you don't change the definition higher than 20, starting yesterday, if someone enters a date as 1/1/20, Alpha will assume the date YEAR is 1920.

    There are a few different locations that you will have to change the default year for the 2020's.

    Such as:
    The 'View' menu, 'Settings', 'Date' - Change the Two digit dates between 00 and (change the 20 to 40) are assumed to be in the 21st century.
    In a grid/UX and possibly others components, Component Properties, Miscellaneous Section, change the format to MM/dd/yyyy and change the switch year to 40.
    In the Search & DETAIL View Properties that have date parameters you must go into each date field, Miscellaneous Section, change the Display format to MM/dd/yyyy to avoid the issue.
    ETC...

    Hope this helps.

    ---------------------------------------------------
    Barry Kucher
    http://www.411tech.org

  2. #2
    "Certified" Alphaholic chadbrown's Avatar
    Real Name
    Chad Brown
    Join Date
    Aug 2007
    Location
    Aurora, Ontario, Canada
    Posts
    1,416

    Default Re: Default date translation is now using 1920 as the year instead of 2020

    I have added the following to my users login redirect page and it seems to work for everywhere I have checked so far.

    session.__protected__clientSideDateFormat = "MM/dd/yyyy"

    Most likely it doesnt need the __protected__ but it works anyways.
    Chad Brown

  3. #3
    Member shapse's Avatar
    Real Name
    Steven Shapse
    Join Date
    Dec 2009
    Location
    Boston area
    Posts
    78

    Default Re: Default date translation is now using 1920 as the year instead of 2020

    These fixes do NOT work with Alpha 11 or earlier. I can find no way to change the date defaults. If I enter 2/14/2020, it enters correctly. If I partially enter 2/14 and then press tab, it produces 2/14/1920. How do you correct the problem in Alpha 11 or Alpha 10? Thanks for the help.

  4. #4
    "Certified" Alphaholic
    Real Name
    Gregg Schmidt
    Join Date
    Mar 2001
    Location
    Milwaukee
    Posts
    1,493

    Default Re: Default date translation is now using 1920 as the year instead of 2020

    Hi Steven,

    Most of us have seen this before; it was known as Y2K.
    The best solution is for end users to use a 4 digit year.
    Knowing that getting end-users to type those 2 extra digits is about
    as easy as getting a democrat to admit President Trump did anything
    good for the USA, you can attach the code below to the onChange event
    for the control in question.
    I chose to do this in xbasic because it is quick and simple.
    JavaScript is doable, but is more initial work.

    Hope this helps,

    Gregg
    Code:
    ' Assuming the name of the control is date1.
    dim varDate as d = ctod(e.datasubmitted.date1)
    if year(varDate) < 1950 then
    	e._set.date1.value = addyears(varDate,100)
    end if

Similar Threads

  1. A friendly word of warning about the date 01/01/2020
    By Jay Talbott in forum Windows Desktop Applications
    Replies: 10
    Last Post: 01-25-2020, 07:47 AM
  2. Date Picker, Enter Year 2020 but Saves as Year 1920!
    By shood38 in forum Mobile & Browser Applications
    Replies: 9
    Last Post: 01-14-2020, 05:14 PM
  3. 2020 defaults to 1920??
    By TerriH in forum Alpha Five Version 8
    Replies: 7
    Last Post: 01-03-2020, 03:57 PM
  4. Report with Daily, Month-to-Date, Year-to-Date Totals
    By Dfred in forum Application Server Version 11 - Web/Browser Applications
    Replies: 0
    Last Post: 04-19-2012, 02:19 PM

Bookmarks

Posting Permissions

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