3 Replies Latest reply: May 15, 2014 9:53 AM by Data Kruncher RSS

    JulianToDate Not Working. Please Help.

    CK77 _

      Hi, I have been trying to convert a three byte julian date to a string date and I keep getting "Operand Types." I followed these instructions to a tee. Any help would be greatly appreciated. Thanks.

       

      PS: I am using V7

       

      1. Select Calculated Fields from Monarch's main menu.

      2. Click the New button to display the Calculated Field Style dialog (note that "Formula-based" is already selected), then click OK.

      3. On the General tab of the Field Properties dialog, type a name for the new field in the Name box (e.g., Date), select Date/Time from the Type drop-down list, then select the Formula tab.

      4. Double-click on JulianToDate in the Functions list, then double-click on the name of the Julian date field in the Fields list. Your expression should now read: JulianToDate(Name of Julian Date Field). Note: If the name of the Julian date field contains spaces, there will be brackets "[]" around it in the expression.

      5. Click OK to close the Field Properties dialog and check to see if the new calculated field in the table is correctly displaying the date.

        • JulianToDate Not Working. Please Help.
          Data Kruncher

          Hey CK77,

           

          I'm not entirely familiar with Julian dates as I just don't need to use that data type, but I'm sure that your expression just needs a little tweak. Can you post your formula and describe what fields are used by the formula (data type and typical value)?

           

          Thanks.

          • JulianToDate Not Working. Please Help.
            CK77 _

            Thanks Data Kruncher.

            I have a julian date for the date an insurance claim was received. It is referred to as 'RCD' in the list of fields of my model. It is a 3 digit field. According to the reference guide, I should be able to convert this to a string date and it will assume the year is current. That's exactly what I want because these are all 2007 claims. But when I open the calculated fields window, name the field, set it as date/time, select conversion, and double click JulianToDate() I get this--> JulianToDate() with a blinking cursor between the parenthesis. I then go to the list of fields and double click RCD, which is a numeric field. It then looks like this JulianToDate(RCD). I hit okay and get an operand types error.

             

            Thank you.

            • JulianToDate Not Working. Please Help.
              Data Kruncher

              Aha! The old mixed data types problem...

               

              The JulianToDate function requires a string field type input, so use the Str function to convert RCD from numeric into a string:

               

              [font="courier"]JulianToDate(Str(RCD))  /font[/quote]will do the job for you.

               

              HTH,

              Kruncher