DateTime.format C# (CSharp) Méthode

format() public méthode

public format ( string format ) : object
format string
Résultat object
    public virtual object format(string format)
    {
        if (format == null)
        {
            //PhpException.ArgumentNull("format");
            //return false;
            throw new ArgumentNullException();
        }

        string fm = format.ToString();
        if (string.IsNullOrEmpty(fm))
        {
            return false;
        }

        return DateTimeFunctions.FormatDate(fm, this.Time, this.TimeZone);
    }

Usage Example

        private void UITime_TimeChange(object sender, TimeSpan e)
        {
            DateTime time = tmpDate;

            time                   = time.setTime(e);
            this.UIDate.Text       = time.format("HH:mm:ss dd/MM/yyyy");
            this.UIDate.LostFocus -= DatePicker_LostFocus;
            this.UIDate.LostFocus += DatePicker_LostFocus;
            this.UIDate.LastSelect();
        }
All Usage Examples Of DateTime::format