Problem with format Time

-matrix--matrix- Member Posts: 103
edited 2011-06-01 in NAV Three Tier
Hi Guys!!

I'm working with a field type TIME in report RTC, in Classic Client Works Fine but
in the RTC The textbox show Date and Time.
Do you know any method to show only time with this format 'hh.mm.ss'?
Thanks

Comments

  • Troubles_In_ParadiseTroubles_In_Paradise Member Posts: 588
    Hi Matteo!
    Try to use this VBScript function:
    = Right(DateTimeField.Value, 8)
    
    It's a workaorund but works :D
    ~Rik~
    It works as expected... More or Less...
  • -matrix--matrix- Member Posts: 103
    Thanks Troubles in Paradise!
    It works as Expected :lol:
  • elflacodemiamielflacodemiami Member Posts: 10
    Hi Folks

    I am facing almost the same issue with a Date field comming from excel. In NAV clasic SQL is importing fine, however I am getting in RTC '10/10/11 12:00 AM' is not a valid date.

    My code is simple: (StartDate is a Date Global Var)
    EVALUATE(StartDate,ExcelBuf."Cell Value as Text");
    PurchasePrice.VALIDATE("Starting Date",StartDate);
    BTW if I want to use the Format Function in the line
    EVALUATE(StartDate,FORMAT(StartDate,0,'<Month,2><Day,2><Year><Closing>'));
    I am getting an error ..."An Invalid field or attribute has been specified for the 'Format' property.

    Where you add your code (= right...)? Or who have any other solution?
    Thanks
    Carlos Garcia
  • mohana_cse06mohana_cse06 Member Posts: 5,504
    Did you try?
    PurchasePrice.VALIDATE("Starting Date",Format(StartDate));
    
  • Troubles_In_ParadiseTroubles_In_Paradise Member Posts: 588
    Hi Folks

    I am facing almost the same issue with a Date field comming from excel. In NAV clasic SQL is importing fine, however I am getting in RTC '10/10/11 12:00 AM' is not a valid date.

    My code is simple: (StartDate is a Date Global Var)
    EVALUATE(StartDate,ExcelBuf."Cell Value as Text");
    PurchasePrice.VALIDATE("Starting Date",StartDate);
    BTW if I want to use the Format Function in the line
    EVALUATE(StartDate,FORMAT(StartDate,0,'<Month,2><Day,2><Year><Closing>'));
    I am getting an error ..."An Invalid field or attribute has been specified for the 'Format' property.

    Where you add your code (= right...)? Or who have any other solution?
    Thanks

    the code with right is placed in the textbox where you want to show the date in the Report Layout.
    However do you need only the date or also the hour?
    ~Rik~
    It works as expected... More or Less...
  • VarathaRajuVarathaRaju Member Posts: 4
    Hi All,
    To Get date in the required Format Open RDLC Layout and select the field for which you want to change the format, Rightclick --> properties --> Format---> Click assist edit button near Format Code--> It opens choose Format--->Select Date-->it will list three formats in that select format u need.
Sign In or Register to comment.