locked
DateTime format. RRS feed

  • Question

  • Greetings,

    I am wondering about the DateTime from crm, does anyone know of a way to query the CRM system on what datetime format it is currently using? Is it even possible?
    Thursday, December 3, 2009 10:52 AM

Answers

  • utc format
    db saved like this 2009-09-05T00:00:00+08:00 ,
    use c# convert:

    DateTime st = DateTime.ParseExact("2009-09-05T00:00:00+08:00", "yyyy-MM-ddTHH:mm:sszzz", System.Globalization.CultureInfo.InvariantCulture);
    Thursday, December 3, 2009 11:12 AM
  • this is user specific..each user can change his default data time format..

    following SQL will get you all datetime and number formats..

    SELECT DateFormat, DateFormat + ' ' + TimeFormat AS DateTimeFormat, NumberLanguageCode, CalendarType, NumberFormat_0_Precision, NumberFormat_1_Precision, NumberFormat_2_Precision, NumberFormat_3_Precision, NumberFormat_4_Precision, NumberFormat_5_Precision, CurrencyFormat_0_Precision, CurrencyFormat_1_Precision, CurrencyFormat_2_Precision, CurrencyFormat_3_Precision, CurrencyFormat_4_Precision, CurrencyFormat_5_Precision FROM dbo.fn_GetFormatStrings()

    Thursday, December 3, 2009 11:49 AM

All replies

  • utc format
    db saved like this 2009-09-05T00:00:00+08:00 ,
    use c# convert:

    DateTime st = DateTime.ParseExact("2009-09-05T00:00:00+08:00", "yyyy-MM-ddTHH:mm:sszzz", System.Globalization.CultureInfo.InvariantCulture);
    Thursday, December 3, 2009 11:12 AM
  • this is user specific..each user can change his default data time format..

    following SQL will get you all datetime and number formats..

    SELECT DateFormat, DateFormat + ' ' + TimeFormat AS DateTimeFormat, NumberLanguageCode, CalendarType, NumberFormat_0_Precision, NumberFormat_1_Precision, NumberFormat_2_Precision, NumberFormat_3_Precision, NumberFormat_4_Precision, NumberFormat_5_Precision, CurrencyFormat_0_Precision, CurrencyFormat_1_Precision, CurrencyFormat_2_Precision, CurrencyFormat_3_Precision, CurrencyFormat_4_Precision, CurrencyFormat_5_Precision FROM dbo.fn_GetFormatStrings()

    Thursday, December 3, 2009 11:49 AM
  • Thanks for the replies, I am pretty sure these will help in my work 8)
    Thursday, December 3, 2009 12:28 PM