Topic
  • 5 replies
  • Latest Post - ‏2013-09-16T10:42:01Z by Dragos.Cojocari
EHcnck
EHcnck
43 Posts

Pinned topic Date formatting

‏2013-09-10T15:39:33Z |

Hello,

I have an Attribute from DOORS (dateAndTime(today) //ATTR variable) and am trying to print it in the following format (9/10/2013 8:00:00 AM) from RPE but I'm getting the following error, any help would be appreciated. Thank you.

CRRPE3107I XML Source: file:/C:/Users/DOORS~1.ADM/AppData/Local/Temp/2/RPE/temp/tmpDOORS/13787365255750/doorsXML13787365255750.xml

CRRPE3501E Error in date pattern: Illegal pattern character 't' in "M/dd/yy h:mm tt".

CRRPE3501E Error in date pattern: Illegal pattern character 't' in "M/dd/yy h:mm tt".

-Jim

  • Dragos.Cojocari
    Dragos.Cojocari
    1617 Posts

    Re: Date formatting

    ‏2013-09-12T11:57:03Z  

    Hey Jim,

     

    i assume you set that pattern in the "date format" property  of the metadata in the docspec, "t" is not a valid character for the date format. See this for how to create a valid pattern: http://docs.oracle.com/javase/1.4.2/docs/api/java/text/SimpleDateFormat.html

     

    Regards,

       Dragos

  • EHcnck
    EHcnck
    43 Posts

    Re: Date formatting

    ‏2013-09-13T17:25:18Z  

    Hey Jim,

     

    i assume you set that pattern in the "date format" property  of the metadata in the docspec, "t" is not a valid character for the date format. See this for how to create a valid pattern: http://docs.oracle.com/javase/1.4.2/docs/api/java/text/SimpleDateFormat.html

     

    Regards,

       Dragos

    Hello,

    Thank you..But I'm still having issues with the time no matter what I do I always get 12:00 AM for the time

    "EEE, d MMM yyyy hh:mm aaa" any ideas? Thank you.

    -Jim

  • Dragos.Cojocari
    Dragos.Cojocari
    1617 Posts

    Re: Date formatting

    ‏2013-09-13T17:27:20Z  
    • EHcnck
    • ‏2013-09-13T17:25:18Z

    Hello,

    Thank you..But I'm still having issues with the time no matter what I do I always get 12:00 AM for the time

    "EEE, d MMM yyyy hh:mm aaa" any ideas? Thank you.

    -Jim

    hh gives you the day in am/pm, that is as 0-12 always. You need to use HH.

     

    Regards,

      Dragos

  • EHcnck
    EHcnck
    43 Posts

    Re: Date formatting

    ‏2013-09-13T17:53:56Z  

    hh gives you the day in am/pm, that is as 0-12 always. You need to use HH.

     

    Regards,

      Dragos

    now I'm getting 'Thu, 12 Sep 2013 00:00 AM' with the following 'EEE, d MMM yyyy HH:mm aaa'

  • Dragos.Cojocari
    Dragos.Cojocari
    1617 Posts

    Re: Date formatting

    ‏2013-09-16T10:42:01Z  
    • EHcnck
    • ‏2013-09-13T17:53:56Z

    now I'm getting 'Thu, 12 Sep 2013 00:00 AM' with the following 'EEE, d MMM yyyy HH:mm aaa'

    Hey Ellis,

     

    from what I see RPE does not export the time part of the date from DOORS, only the date. And for dates without times the hour is 00:00AM. Please raise a defect via IBM support.

     

    Regards,

        Dragos