Clarity

  • 1.  How to format date from query to gel script for XOGing

    Posted Apr 06, 2017 10:46 AM

    How to format date from query to gel script for XOGing?

    I am running a standard query in Oracle for project data in a gel script and getting

    start="2017-10-18 08:00:00.0” and passing that to xml file content fro XOGing.

     

    The XOG fails because it wants the date  like

    start="2017-10-18 08:00:00.0”

     

    I could manipulate that with db date formats and manipulate the result with sql and  in gel to get the right format.

    Before doing that just wanted to know how others are doing that?

    Is there an Oracle date format which is directly compatible with the required format for XOGing without any manipulation?

     

    Did not see any related posts with a quick search.



  • 2.  Re: How to format date from query to gel script for XOGing
    Best Answer

    Posted Apr 06, 2017 11:18 AM

    Just for a date I would use ; TO_CHAR(my_date,'YYYY-MM-DD')||'T00:00:00'



  • 3.  Re: How to format date from query to gel script for XOGing

    Posted Apr 06, 2017 07:23 PM

    I do like David, I use "to_char"



  • 4.  Re: How to format date from query to gel script for XOGing

    Posted Apr 07, 2017 05:46 AM

    Thank you Dave_3.0 and  Aurora_Gaimon 

    Works fine for me on the first attempt.



  • 5.  Re: How to format date from query to gel script for XOGing

    Posted Apr 13, 2017 06:24 AM

    Thanks for the Answer



  • 6.  Re: How to format date from query to gel script for XOGing

    Posted Apr 07, 2017 10:34 AM

    For Oracle you can use the to_char , and on mssql you can use the convert function with 126 as date format, it will format the date as "yyyy-mm-ddThh:mi:ss.mmm" (as required by XOG).



  • 7.  Re: How to format date from query to gel script for XOGing

    Posted Apr 21, 2017 09:41 AM

    In case the dates are for the milestones using 00:00:00: makes you hit
    https://communities.ca.com/message/100942979?commentID=100942979#comment-100942979 

    Maybe some other time might be better like 00:08:00 and 00:16:00