IBM Support

How to fix YFC0004:Invalid Date Format

Troubleshooting


Problem

How to fix YFC0004:Invalid Date Format

Symptom

While selecting a date range in Order search screen user receives the above error "YFC0004:Invalid Date Format"

Error Message

Error Trace:

 

   <Attribute Name="ErrorDescription" Value="Invalid Date Format"/>
        <Attribute Name="ErrorRelatedMoreInfo" Value=""/>
        <Attribute Name="DateTimeNoSecondsFormat" Value="dd HH:mm"/>
        <Attribute Name="StringPassed" Value="14-01-2009"/>
        <Attribute Name="DateTimeFormat" Value="dd/MM/yyyy HH:mm:ss"/>
        <Attribute Name="DateFormat" Value="dd/MM/yyyy"/>
        <Stack>com.yantra.yfc.util.YFCException   at
            com.yantra.yfc.util.YFCDate.<init>(YFCDate.java:123)
            at
            com.yantra.yfc.ui.backend.util.LocalizedXMLPeon.setValue(LocalizedXMLPeon.java:47)
            at
            com.yantra.yfc.ui.backend.util.Util.getRequestDOM(Util.java:828)
            at
            com.yantra.yfc.ui.backend.servlets.BaseServlet.getRequestDOM(BaseServlet.java:198)
            at
            com.yantra.yfc.ui.backend.servlets.ListServlet.processRequest(ListServlet.java:40)
            at
            com.yantra.yfc.ui.backend.servlets.ConsoleServlet.callServlet(ConsoleServlet.java:300)
            at
            com.yantra.yfc.ui.backend.servlets.ConsoleServlet.processRequest(ConsoleServlet.java:170)
            at
            com.yantra.yfc.ui.backend.servlets.BaseServlet.doPost(BaseServlet.java:241)
            at
            javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
            at
            javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
            at
            weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:225)
            at
            weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:127)
            at
            weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)
            at
            weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
            at
            weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3214)
            at
            weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
            at
            weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
            at
            weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:1983)
            at
            weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1890)
            at
            weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1344)
            at
            weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
            at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)  </Stack>
    </Error>
</Errors>

Resolving The Problem

Resolution steps:

1) Check Validation_<lang>_<Countrycode>.js  present in <YFS_HOME>/webpages/yfcscripts folder
 
2) Check date Validation section of the file.
Correct the formats to
 yfcDateFormat = "MM/dd/yyyy";
 yfcTimeFormat = "hh:mm:ss";
 yfcHourMinuteTimeFormat = "hh:mm";
 yfcDateTimeFormat = "MM/dd/yyyy hh:mm:ss";

 3) Anything other than yfcDateFormat = "MM/dd/yyyy" will throw the error ,lets say in yfcDateFormat ="MM-dd-yyyy" should throw an error

[{"Product":{"code":"SS6PEW","label":"IBM Sterling Order Management"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Component":"Not Applicable","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Historical Number

NFX4757

Product Synonym

[<p><b>]Severity[</b><p>];Normal

Document Information

Modified date:
16 June 2018

UID

swg21556057