Syntax changes for Time()

PowerBuilder 2025 R2 enhances support for SQL Server datetime2, ensuring consistent handling of high-precision datetime values (up to 7 fractional seconds) across DataWindow, runtime, and the debugger.

Please notice the following when upgrading the application:

  • Time() syntax changes

    To align with the 7 fractional seconds precision, the syntax for Time() has changed from

    Time (int h, int m, int s, int u)

    To

    Time (int h, int m, int s, long u)

    And zeros ("0") will be added to the beginning of microseconds to reach 7 digits, for example,

    tt = time(10, 11, 12, 123456)
    //returns value: 10:11:12.0123456
    
    tt = time(10, 11, 12, 1)
    //returns value: 10:11:12.0000001
  • PSR file incompatibility issue

    After datetime values support 7-digit fractional seconds, the value of fractional seconds will change when using PSR files exported from previous PowerBuilder versions. For example, 003450 will become 000345. To avoid incompatibility issues, please use the PSR file generated by 2025 R2 (do not use PSR files generated by 2025 or earlier versions).