var dt:DateTime = DateTime.ParseExact(last_activity, "YYYY-MM-dd h:mm:ss", null);
だと、
System.FormatException: Invalid format string at System.DateTime.ParseExact (System.String s, System.String[] formats, IFormatProvider provider, DateTimeStyles style) [0x00000] in <filename unknown>:0 at System.DateTime.ParseExact (System.String s, System.String format, IFormatProvider provider, DateTimeStyles style) [0x00000] in <filename unknown>:0 at System.DateTime.ParseExact (System.String s, System.String format, IFormatProvider provider) [0x00000] in <filename unknown>:0 at FriendList.MakeFriendList (System.String user_name, Int32 gw_type, Int32 gw_level, System.String last_activity, Int32 friend_status, System.String invite_code) [0x00096] in
エラーになる。
※Parseメソッドで変換できない書式の文字列はDateTime.ParseExactメソッド。
yyyyは小文字?
・24時間表記はHH
DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")
・AM/PMはtt
DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss tt")