Show / Hide Table of Contents

    StringExtensions.Time(this string str) Method

    .NET Standard 2.x

    Converts a string containing a valid time into a time value.

    Namespace: PowerScript.Bridge

    Assembly: PowerScript.Bridge.dll

    Syntax

    public static TimeSpan? Time(this string str);
    

    Parameters

    str System.String

    A string whose value is a valid time (such as 8am or 10:25) that you want returned as a time. Only the hour is required; you do not have to include the minutes, seconds, or microseconds of the time or am or pm.

    The default value is 00 for minutes and seconds and 000000 for microseconds. PowerBuilder determines whether the time is am or pm based on a 24-hour clock.

    String can also be an Any variable containing a string.

    Returns

    System.TimeSpan

    Returns the time in str as a time. If str does not contain a valid time or is an incompatible datatype, Time returns 00:00:00.000000. If str is null, Time returns null.

    Examples

    Coming soon.

    Applies to

    .NET Standard

    2.x

    Back to top Generated by Appeon