number of the month

widywidy Member Posts: 13
Hello,
I am using navision during my training, i am working mainly on reports.
they need many reports to be "print to excel" so as they can manipulate them. I am asked to add a colum, not necessrly in the report but it has to appear on excel in which beside the "posting date" you have the number of the month.. i know under excel they are functions that can be used, but with navision...
I tried this:

Expr1 :='<CM >';
DateExpr:="G/L Entry"."Posting Date";
DateC:= DATE2DMY(Expr1, DateExpr);

of course it 's not correct,
"cannot convert date to text".. ](*,)

Thanks for reading, any help is welcome. i need to be guided, fell lost! :oops:
widy

Comments

  • FDickschatFDickschat Member Posts: 380
    Take a look at the help for DATE2DMY. You are using the parameters wrong. It should be something like
    Result := DATE2DMY(DateToProcess,2)
    
    Result will be an integer. So if you need a Text/Char you need to use format:
    ResultText := format(DATE2DMY(DateToProcess,2))
    
    Frank Dickschat
    FD Consulting
  • widywidy Member Posts: 13
    Thks a lot for answering so quickly, i tried again and again, still have the same message, i changed the parameters, maybe it is not the way, i mean, "DATE2DMY" is not the correct one to "extract" the month.
    Anyway, thks again. i keep searching.
    I aslo tried calcdate and createDate, but nothing better...
    thks.
    widy
  • FDickschatFDickschat Member Posts: 380
    DATE2DMY is correct. CALCDATE does it the other way round.

    Just carefully read the help for DATE2DMY and try the example from the help. It will help you understand how it works.
    ResultInteger := DATE2DMY("G/L Entry"."Posting Date",2);
    
    Frank Dickschat
    FD Consulting
  • rhpntrhpnt Member Posts: 688
    widy wrote:
    Hello,
    I am using navision during my training, i am working mainly on reports.
    they need many reports to be "print to excel" so as they can manipulate them. I am asked to add a colum, not necessrly in the report but it has to appear on excel in which beside the "posting date" you have the number of the month.. i know under excel they are functions that can be used, but with navision...

    Thanks for reading, any help is welcome. i need to be guided, fell lost! :oops:
    widy

    I can't help not posting a reply on this one. I feel really sorry for you because it seems that you are beeing exploited to do the dirty work. If you are a newbie to NAV and in "training" as you state then this is really not the kind of work you should be doing. Every experienced NAV consultant and developer would tell you that exporting NAV reports to Excell for further "manipulation" is nonsense and should not be done for this cause. If your customer or employer wants to manipulate NAV data in excell they should export or copy ledger data into Excell and then perform their manipulations (I presume pivoting and so on...). Exporting report data do Excell works within very narrow circumstances and can get you quickly into trouble (like now).
  • widywidy Member Posts: 13
    [/quote]
    I can't help not posting a reply on this one. I feel really sorry for you because it seems that you are beeing exploited to do the dirty work. If you are a newbie to NAV and in "training" as you state then this is really not the kind of work you should be doing. Every experienced NAV consultant and developer would tell you that exporting NAV reports to Excell for further "manipulation" is nonsense and should not be done for this cause. If your customer or employer wants to manipulate NAV data in excell they should export or copy ledger data into Excell and then perform their manipulations (I presume pivoting and so on...). Exporting report data do Excell works within very narrow circumstances and can get you quickly into trouble (like now).[/quote]

    Don't feel sorry! i am not child anymore, i wish i was! Anyway true that i never heard about nav before i got this training.

    But i am happy i found this forum, you are all going to help me and learn me little things :mrgreen: , at the end i will know many things!
    it might be a dirty work, and better for me if i was asked to develop or worked an windev etc... but i am not "exploited".
    Now if you could quicly explain me why "exporting data to Excel works within very narrow circumstances"....that would be nice.
    thks
    widy.
  • AndwianAndwian Member Posts: 627
    Would you give me the detail scenario, with the number example?
    Regards,
    Andwian
Sign In or Register to comment.