how to change machine time format in tdl

Discussion in 'Free Source Codes' started by ONKAR, May 15, 2019.

         
  1. ONKAR

    ONKAR Member


    I have developed a customized invoice tdl , in this tdl working fine, but in the invoice, print has shown machine time like 13:51, but I want to be shown as 1.51 with am or pm so how to get this.
     


  2. lumos

    lumos New Member


    Format: "12 Hour"
     


  3. ONKAR

    ONKAR Member


    @lumos bhai not working shown as bad formula
     


  4. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Show your field code .................

    Actually one does not need to specify "12 hour" as it is the default setting, in absence of any any other parameters.

    So you must have added some parameters.....show field code, so we can understand.
     


  5. ONKAR

    ONKAR Member


    @amit SIR, Please see this code

    [Line:OK Invoice Time]
    Field: Medium Prompt, Simple Field
    Local: Field: Medium Prompt: Set as: " वेळ : - "
    Local: Field: Medium Prompt: Style: P9B
    Local: Field: Medium Prompt: Width: 20
    Local: Field: Simple Field: Set as: $$String:$$MachineTime
    Local: Field: Simple Field: Style: P9
    Local: Field: Simple Field: Full Width: Yes
    Space Top:0.5

    AND SEE THIS IMAGE

    demo.JPG
     


  6. Bipin Damania

    Bipin Damania Member


    Change System default Time from 24 he's to 12 hrs then check
     


  7. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    [Line:OK Invoice Time]
    Field: Medium Prompt, MyTimeField
    Local: Field: Medium Prompt: Set as: " वेळ : - "
    Local: Field: Medium Prompt: Style: P9B
    Local: Field: Medium Prompt: Width: 20
    Space Top:0.5

    [Field : Mytimefield]
    Use : Name Field
    Type : Time
    Set as : $$String:$$MachineTime
    Style: P9
    Full Width: Yes
     


  8. lumos

    lumos New Member


    I have used this it is working for me.
    Set: $$Time:$$MachineTime
    Format: "12 Hour"
     


  9. ONKAR

    ONKAR Member


    @amit sir as per your solution not getting the result , shown like 13:15 only, but I want like normal time like now the time is 1:16 pm so how ??
     


  10. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Try as per @lumos suggestion. See if it is working.
     


  11. garima

    garima Active Member


    Format: "12 Hour" Shoud work
     


  12. ONKAR

    ONKAR Member


    not working sir where to add this FORMAT - LIKE THIS BELOW

    1 ] AS PER YOUR SOLUTION NOT WORKING AND AS PER LUMOS SOLUTION ALSO NO WORKING.

    [Line: OK Invoice Time]
    Field: Medium Prompt, MyTimeField
    Local: Field: Medium Prompt: Set as: " वेळ : - "
    Local: Field: Medium Prompt: Style: P9B
    Local: Field: Medium Prompt: Width: 20
    Space Top:0.5

    [Field: Mytimefield]
    Use: Name Field
    Type: Time
    Set: $$Time:$$MachineTime
    Format: "12 Hour"
    Style: P9
    Full Width: Yes



    OR

    [Line: OK Invoice Time]
    Field: Medium Prompt, Simple Field
    Local: Field: Medium Prompt: Set as: " वेळ : - "
    Local: Field: Medium Prompt: Style: P9B
    Local: Field: Medium Prompt: Width: 20
    Local: Field: Simple Field:Set: $$Time:$$MachineTime Format: "12 Hour"
    Local: Field: Simple Field: Style: P9
    Local: Field: Simple Field: Full Width: Yes
    Space Top:0.5

    BOTH OF NOW WORKING PROPERLY, WHY ??
     


  13. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Am confused....Working or not working ??
     


  14. lumos

    lumos New Member


    Remove type:time from your field

    [Line: OK Invoice Time]
    Field: Medium Prompt, MyTimeField
    Local: Field: Medium Prompt: Set as: " वेळ : - "
    Local: Field: Medium Prompt: Style: P9B
    Local: Field: Medium Prompt: Width: 20
    Space Top:0.5

    [Field: Mytimefield]
    Use: Name Field
    Set: $$Time:$$MachineTime
    Format: "12 Hour"
    Style: P9
    Full Width: Yes



    OR

    [Line: OK Invoice Time]
    Field: Medium Prompt, Simple Field
    Local: Field: Medium Prompt: Set as: " वेळ : - "
    Local: Field: Medium Prompt: Style: P9B
    Local: Field: Medium Prompt: Width: 20
    Local: Field: Simple Field:Set: $$Time:$$MachineTime
    Local: Field: Simple Field:Format: "12 Hour"
    Local: Field: Simple Field: Style: P9
    Local: Field: Simple Field: Full Width: Yes
    Space Top:0.5

    Now both of them should work theorotically.
     
    Last edited: May 16, 2019


  15. garima

    garima Active Member



    Me Toooooooooooooooooo:eek::oops:
     


  16. ONKAR

    ONKAR Member


    @lumos yes I already removed this, but not getting a result , now as per your solution, showing as an error in tdl, 'Function: Time' could not find description!
     


  17. ONKAR

    ONKAR Member


    @amit Sir not working, sorry this is writing mistake

     


  18. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    The code I have given is working for me..... without the FORMAT..... as I said earlier default is 12 hour, so it need not be specified again.

    [Field: Mytimefield]
    Use: Name Field
    Type: Time
    Set: $$Time:$$MachineTime
    Style: Normal
    Width: 15

    Also see the screenshot below..... it is 6.59 pm and NOT 18.59

    Capture.PNG
     


  19. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Still, if you are not able to achieve it, then try changing the Windows System time format to 12 hour.

    Then reboot the window system, for the changes to take effect.
     


  20. lumos

    lumos New Member


    Try doing what amit sir told, the same code is working for me.
     


Share This Page