time in words format

pratyusha
pratyusha Member Posts: 14
Is there any way time can be displayed in words format for eg: the time displayed in a TAX INVOICE form is shown as 15:30.It is required that the time be displayed in words viz: FIFTEEN HOURS THIRTY MINUTES . Any help??? :-k

Comments

  • kine
    kine Member Posts: 12,562
    Just use the Duration datatype and assign the value as
      DurationVariable := TIME - 0T;
    
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • pratyusha
    pratyusha Member Posts: 14
    Mr kamil this does'nt work.It displays an error of invalid time. :?:
  • pratyusha
    pratyusha Member Posts: 14
    Donr Mr.Kamil thanks a ton. though i had to try TIME-0000T instead of 0T!!! :thumbsup:
  • kine
    kine Member Posts: 12,562
    Ok, good that it work for you... :-)
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • pratyusha
    pratyusha Member Posts: 14
    Mr.Kamil, one glitch again... The time in words prints as 11 hours... but it is required to be printed as ELEVEN HOURS...!!!! #-o
  • kine
    kine Member Posts: 12,562
    This cannot be done by standard. You need to use same process as when translating amounts into words. Just search the forum for "amount in words" or something similar. There are posts about the correct function for that. You can extract the numbers from the result you have now and replace them with the text.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.