Event Id : 20010. The date is not valid.

Hi All,

I have created a Jobqueue. And try to run this through NAS.

But if I am trying this I got the below warning in Event viewer log as

Event Id : 20010. The date is not valid.

Can you please help me to resolve this issue.

Thanks in advance,
Jacob.A

Answers

  • krikikriki Member, Moderator Posts: 9,115
    In general that means that you are evaluating a date-string that is in a certain format, but the NAS expects another format. You should never trust evaluate in this case (same for decimals), but use your own code to do it.
    A shortcut can be: login in as the NAS user on the server where the NAS runs and change the regional settings to the correct settings for the date. then logout and restart the NAS.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • Jacob1227Jacob1227 Member Posts: 128
    Thanks for the reply kriki.

    Can you please tell me how to change the regional settings?

    guide me,,,
  • Sachin_Sachin_ Member Posts: 67
    Hello @Jacob1227 ,

    Please Look into this below link for regional settings
    https://saurav-nav.blogspot.com/search?q=regional+settings
  • Jacob1227Jacob1227 Member Posts: 128
    Hi Kriki/Sachin,

    I have set the regional settings properly.

    But still facing the same error.

    Is there anything depends on navtimer?

    Guide me,,,
  • Jacob1227Jacob1227 Member Posts: 128
    Hi,

    Can you please provide me some idea in this issue.I got stucked here for last two days :(

    Somebody guide me,,
  • TallyHoTallyHo Member Posts: 417
    Are you importing a file? If so, post the date from the file here, and the code you use to process it.
  • Jacob1227Jacob1227 Member Posts: 128
    edited 2019-06-21
    Hey Tally,

    I am not importing a file. I am exporting customers from a customer table through dataport and run that dataport from codeunit.

    Now I am trying to create a jobqueue for that codeunit to automate the process.

    I have set the NAS configuration properly but i am trying to run a Jobqueue and i got the error .

    "The date is not valid"

    Regards,
    Jacob.A

  • TallyHoTallyHo Member Posts: 417
    edited 2019-06-21
    You cannot run a dataport using nas, do not even try. Try exporting bij coding it in a CU, or create an xml port that exports csv
  • Jacob1227Jacob1227 Member Posts: 128
    But,in my local i can able to run a dataport through nas.i have tried and its running successfully.

    i got the error only in client environment.
  • TallyHoTallyHo Member Posts: 417
    Did you install a NAS service on your laptop? That is what isn't possible. It will run in job queue, just not executed by a NAS.
  • Jacob1227Jacob1227 Member Posts: 128
    let me explain something. now i didn't set any jobqueue to run. Just i run the Jobqueue Dispatcher code unit(448).

    but it just shows the same the error.

    ukww2j0muoqo.png

    please explain this why its not running.
  • TallyHoTallyHo Member Posts: 417
    Well did you debug it?
  • Jacob1227Jacob1227 Member Posts: 128
    yeah,but still not able find out exactly where this error coming from :/
  • ricardopaivaricardopaiva Member Posts: 14
    edited 2019-06-22
    The debug should stop exactly where the error is coming from.
    This error happens when you’re doing a CALCDATE with an empty date variable. Please turn on the debug and check on that. Post a screenshot from the debug window in the line where you’re getting the error.
  • Jacob1227Jacob1227 Member Posts: 128
    Hi Ricadopaiva,

    Check the screenshot...

    uqwn8rrmiuyc.png
  • TallyHoTallyHo Member Posts: 417
    Single instance codeunits return unexpected results in the debugger.
    Try running another task, to see if the same error occurs.
    Start your solution without the job queue, see if the error occurs

    If both run fine.. try replacing your dataport.
    Sooner or later you'll stumble into this, so why not fix it now.
  • Jacob1227Jacob1227 Member Posts: 128
    Hi TallyHo,

    If i am running the codeunit without single instance,no error is populated. at the same time nothing happened in the jobqueue also.

    Ex: i am changing 448(Jobqueue dispacher)'s property Single Instance to No and created the Jobqueue.then run the Job queue dispacher ,it doesn't throw any error at the same time Jobqueue also doesn't run. :(

    Suggest me some idea to fix this.



  • ricardopaivaricardopaiva Member Posts: 14
    If you run the codeunit directly do you get the error? Or the error only occurs when running from job scheduler?
Sign In or Register to comment.