1 Reply Latest reply on Feb 22, 2015 12:17 PM by philmodjunk

    Converting time twice from UTC

    TracyBogans

      Title

      Converting time twice from UTC

      Post

      I'm pulling information from a SQL database that is storing time as UTC  time. But when I import it into filemaker  it convert into a the incorrect Military time. When I see it in the SQL databse it shows and save as 14:18:26 UTC... when it gets to Filemaker it reads 2:15:26 ( which I thinking is military time but the org time of the time in UTC 14:18:26  which is 9:18:26 am EST and Military time should be the same... but filemaker coverts it to 14:18:26 which is 2:18:26 PM EST ...  I have tried importing  where I let filemaker create the fields and also I have try it where I create the field as all text field ... same result.

      HELP

       

      ConvertingTime.PNG

        • 1. Re: Converting time twice from UTC
          philmodjunk

          You'll need to compare the precise value being imported from the SQL source. In FileMaker, Time is stored as an integer measuring the number elapsed seconds since midnight. But you do not have a time value here, you have a time stamp value--a value that combines both date and time in the same field. In FileMaker, a TimeStamp records be the number of seconds since 12/31/0000. But a date, time or timestamp value from a different source will not necessarily follow the same rule and thus, you'll need to figure out a conversion value to apply to get the correct value to display in your FileMaker field.

          The simplest way to convert this, may be to import the value as text and then use the GetAsTimeStamp function to convert the contents of the text field into a TimeStamp value in a separate field.