Converting date format from C# to Ext

Page 2 of 2 FirstFirst 12
  1. #11
    A Format Specifier is a string.

    The ConvertNetToPHP Method will convert "d" and "D" to their PHP equivalents.

    Example

    var format = Ext.Net.Utilities.DateTimeUtils.ConvertNetToPHP("d");
    
    X.Msg.Notify("Format", format).Show();
    Hope this helps.
    Geoffrey McGill
    Founder
  2. #12
    I'd like to apologize for stating that it was not possible when it is.

    I got an NullReferenceException when i ran the the following code:

    Ext.Net.Utilities.DateTimeUtils.ConvertNetToPHP("d", null);
    so i thought that it was not possible.
  3. #13
    try use c# TryParse method...

    public static bool TryParse(
        string s,
        out DateTime result
    )
    This method is similar to the DateTime.Parse(String) method, except that the TryParse(String, DateTime) method does not throw an exception if the conversion fails. More about...date conversion

    Johnson
    Last edited by geoffrey.mcgill; Dec 14, 2016 at 5:49 AM.
Page 2 of 2 FirstFirst 12

Similar Threads

  1. Replies: 3
    Last Post: May 09, 2012, 4:28 PM
  2. Replies: 1
    Last Post: Apr 13, 2012, 1:52 PM
  3. Replies: 4
    Last Post: Jun 30, 2011, 3:30 PM
  4. [CLOSED] How to Set Date Format in a Coolite Date Field
    By speedstepmem3 in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Dec 02, 2010, 8:47 AM
  5. date format for all date fields in grid?
    By marcmvc in forum 1.x Help
    Replies: 0
    Last Post: Dec 01, 2009, 3:41 PM

Posting Permissions