Converting date format from C# to Ext

Page 1 of 2 12 LastLast
  1. #1

    Converting date format from C# to Ext

    For information purposes only: in case of someone need to convert date format from C# to Ext, please use Ext.Net.Utilities.DateTimeUtils.ConvertNetToPHP method, as shown bellow:

    string formatConverted = Ext.Net.Utilities.DateTimeUtils.ConvertNetToPHP("dd/MM/yyyy HH:mm:ss", null);
    //formatConverted = d/m/Y H:i:s
    Last edited by RCN; Nov 06, 2012 at 7:59 PM.
  2. #2
    Thanks for passing along this DateTime format tip. I'm sure it will help others in the future.
    Geoffrey McGill
    Founder & CEO
  3. #3
    I hope so. Geoffrey, what about we open a Tips area in the forum? i say it because for me it's strange to post a tip in this area. it would be nice to see other users just reading the tips and discovering new approaches to solve common problems
  4. #4
    I have moved this thread to the "Examples and Extras" forum. Maybe I'll change the forum name to "Examples and Tips".
    Last edited by geoffrey.mcgill; Dec 03, 2012 at 9:31 PM.
    Geoffrey McGill
    Founder & CEO
  5. #5
    Thannk you Geoffrey
  6. #6
    Hi ,

    Does ConvertNetToPHP accepts format specifiers as well or it only accepts format strings.
  7. #7
    What do you mean with "format specifiers"?
  8. #8
    It has two overloads:

    public static string ConvertNetToPHP(string format);
    public static string ConvertNetToPHP(string format, CultureInfo culture);
  9. #9
    hi,

    Examples of Format specifiers are :
    d - Short date pattern
    D - long date pattern

    The list can be found here:
    http://msdn.microsoft.com/en-us/libr...(v=vs.71).aspx
  10. #10
    I tested and unfortunately it does not support format specifiers
Page 1 of 2 12 LastLast

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 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