11 Replies Latest reply on Dec 9, 2014 5:18 AM by taylorsharpe

    Date format error

    jibardhan

      I have 2 fields :- 1 . Date1 = auto enter creation date , 2. Auto enter calculation - Get(CurrentDate)

       

      In debugger , when i am creating creating a record,

       

      Date1 = 12-04-2014

      Date2= 12/04/2014

       

      Always use current system's settings is on.

       

      -------------------------

       

      I want to change the Date1 format to Date2.

       

       

       

      Thanks

      Jibardhan

        • 1. Re: Date format error
          jibardhan

          File is hosted on server

          • 2. Re: Date format error
            gdurniak

            in Layout Mode,  click on each date field,  and look for the date format in the Inspector

             

            greg

             

            > I want to change the Date1 format to Date2.

            • 3. Re: Date format error
              jibardhan

              This is nothing to do with the layout formatting ,as i am telling about seeing data in DATA VIEWER

              • 4. Re: Date format error
                gdurniak

                That is odd. it seems Creation Date will use the Date Format in your OS

                 

                greg

                 

                 

                > This is nothing to do with the layout formatting

                • 5. Re: Date format error
                  jibardhan

                  the system has a setting of 12/4/2014

                  • 6. Re: Date format error
                    stefan_s

                    Hi jibardhan,

                     

                    In your case I would save a clone of the file on the computer where the system setting is what you want (12/4/2014).

                     

                    Check to see how that clone behaves.

                     

                    Most probably, the file was created on a system with the setting 12-04-2014. But the Get(CurrentDate) apparently takes the system format.

                     

                    If this is the case, you need to create the clone, then import all data from the old version.

                     

                    Hope this helps,

                     

                    __

                    Stefan Schutt, Mouse Up, Finland

                     

                     

                    jibardhan <noreply@filemaker.com> kirjoitti 4.12.2014 kello 12.44:

                     

                     

                    created by jibardhan in Advanced Discussion - View the full discussion

                    the system has a setting of 12/4/2014

                     

                    Reply to this message by replying to this email -or- go to the message on FileMaker Technical Network

                    Start a new discussion in Advanced Discussion by email or at FileMaker Technical Network

                    Manage your email preferences.

                     

                    FileMaker Developer Conference 2015 • Las Vegas • Nevada • July 20-23 • www.filemaker.com/devcon

                     

                    • 7. Re: Date format error
                      gdurniak

                      just out of curiosity,  I edited my  United States  setting,  so that dates use dashes,  making it "Custom"  ( Mac OS )

                       

                      I then created a file,  and set my system back to  "United States"

                       

                      1.  opening this file,  I get no warning of the "custom" setting,  even though the file Options are set to "Warn" ( interesting )

                       

                      2.  I now have the opposite of you:   Creation Date is slashed ( the restored current system setting ), and  Get current date is dashed  ( the file's "custom" setting )

                       

                      greg

                       

                      > Date1 = 12-04-2014

                         Date2= 12/04/2014

                      • 8. Re: Date format error
                        jibardhan

                        Thanks Stefan , for time and reply.

                         

                        I have read about this stuff "making a clone and importing data"  in some blogs earlier.

                         

                        Is there any other time saving methods to rectify the date format ??

                         

                        Thanks

                        Jibardhan

                        • 9. Re: Date format error
                          johnnyb

                          Just wait til you start trying to find and sort based on dates saved in different formats. I'd love to understand how this is being done under the hood, but from what I can tell, it's just chaos, and dates are not saved in any kind of standard format within the database, but in whatever format any given system uses. FMP does its best to coerce between formats, but it gets dicey when going to and from strings, which is hard to avoid when doing Perform Find.

                           

                          FWIW, I keep my system formats set to the ISO date and time representation formats: YYYY-MM-DD HH:MM:SS. It seems to stick with the file when I upload it to the server, so at least anything I make going forward will be in something resembling a consistent standard.

                           

                          Now if the whole world would adopt ISO standard date and time format, this would never be an issue. Instead we have maddening inconsistency and ambiguity in every corner of society and for all time. Good luck.

                          • 10. Re: Date format error
                            jibardhan

                            Thanks all .... the only remedy that i have found as of now is of creating clone DB and import

                            • 11. Re: Date format error
                              taylorsharpe

                              I think you are focusing up on how the date is viewed.  Technically and for calculation purposes, FileMaker stores the date as the number of days since 1/1/0001 (m/d/yyyy).  It remembers how you input the field, but uses the number for everything else.  So when in a layout and if you set formatting, it will use the number version of the date to determine how the formatting will look in a date field on a layout.  And it uses the number for any calculations. 

                               

                              If in dataviewer you just want to see it formatted differently, then simply Substitute ( Date ; "-" ; "/" ).  But in DataViewer, what it will want is either a date field or something formatted by the Date function of Date ( mm ; dd ; yyyy ). 

                               

                              It does make me wonder what the format of the field is that you are auto entering the date.  Is it a date field?  Or could it be a text field?  That could throw things off.