728x90
반응형
[ WPF & C# (C Sharp)] - DateTime 구조체 / 파싱 / parsing / 날짜 / 시간
@ DateTime 구조체
// The example displays the following output: // Date String Date // // 01/06/2013 01/06/2013 00:00:00 // 01/06/13 01/06/2013 00:00:00 // 1/6/13 01/06/2013 00:00:00 // 1.6.13 01/06/2013 00:00:00 // 2013-06-01 01/06/2013 00:00:00 // 01 June 2013 01/06/2013 00:00:00 // 1 June 2013 01/06/2013 00:00:00 // 01 June 2013 12:32 01/06/2013 12:32:00 // 01 June 2013 12:32 01/06/2013 12:32:00 // 01 June 2013 12:32 PM 01/06/2013 12:32:00 // 01 June 2013 12:32 PM 01/06/2013 12:32:00 // 1 June 2013 12:32 01/06/2013 12:32:00 // 1 June 2013 12:32 01/06/2013 12:32:00 // 1 June 2013 12:32 PM 01/06/2013 12:32:00 // 1 June 2013 12:32 PM 01/06/2013 12:32:00 // 01 June 2013 12:32:30 01/06/2013 12:32:30 // 01 June 2013 12:32:30 01/06/2013 12:32:30 // 01 June 2013 12:32:30 PM 01/06/2013 12:32:30 // 01 June 2013 12:32:30 PM 01/06/2013 12:32:30 // 1 June 2013 12:32:30 01/06/2013 12:32:30 // 1 June 2013 12:32:30 01/06/2013 12:32:30 // 1 June 2013 12:32:30 PM 01/06/2013 12:32:30 // 1 June 2013 12:32:30 PM 01/06/2013 12:32:30 // 01/06/2013 12:32 01/06/2013 12:32:00 // 01/06/2013 12:32 01/06/2013 12:32:00 // 01/06/2013 12:32 PM 01/06/2013 12:32:00 // 01/06/2013 12:32 PM 01/06/2013 12:32:00 // 01/06/13 12:32 01/06/2013 12:32:00 // 01/06/13 12:32 01/06/2013 12:32:00 // 01/06/13 12:32 PM 01/06/2013 12:32:00 // 01/06/13 12:32 PM 01/06/2013 12:32:00 // 1/6/13 12:32 01/06/2013 12:32:00 // 1/6/13 12:32 01/06/2013 12:32:00 // 1/6/13 12:32 PM 01/06/2013 12:32:00 // 1/6/13 12:32 PM 01/06/2013 12:32:00 // 1.6.13 12:32 01/06/2013 12:32:00 // 1.6.13 12:32 01/06/2013 12:32:00 // 1.6.13 12:32 PM 01/06/2013 12:32:00 // 1.6.13 12:32 PM 01/06/2013 12:32:00 // 2013-06-01 12:32 01/06/2013 12:32:00 // 2013-06-01 12:32 01/06/2013 12:32:00 // 2013-06-01 12:32 PM 01/06/2013 12:32:00 // 2013-06-01 12:32 PM 01/06/2013 12:32:00 // 01/06/2013 12:32:30 01/06/2013 12:32:30 // 01/06/2013 12:32:30 01/06/2013 12:32:30 // 01/06/2013 12:32:30 PM 01/06/2013 12:32:30 // 01/06/2013 12:32:30 PM 01/06/2013 12:32:30 // 01/06/13 12:32:30 01/06/2013 12:32:30 // 01/06/13 12:32:30 01/06/2013 12:32:30 // 01/06/13 12:32:30 PM 01/06/2013 12:32:30 // 01/06/13 12:32:30 PM 01/06/2013 12:32:30 // 1/6/13 12:32:30 01/06/2013 12:32:30 // 1/6/13 12:32:30 01/06/2013 12:32:30 // 1/6/13 12:32:30 PM 01/06/2013 12:32:30 // 1/6/13 12:32:30 PM 01/06/2013 12:32:30 // 1.6.13 12:32:30 01/06/2013 12:32:30 // 1.6.13 12:32:30 01/06/2013 12:32:30 // 1.6.13 12:32:30 PM 01/06/2013 12:32:30 // 1.6.13 12:32:30 PM 01/06/2013 12:32:30 // 2013-06-01 12:32:30 01/06/2013 12:32:30 // 2013-06-01 12:32:30 01/06/2013 12:32:30 // 2013-06-01 12:32:30 PM 01/06/2013 12:32:30 // 2013-06-01 12:32:30 PM 01/06/2013 12:32:30 // 01 June 01/06/2013 00:00:00 // 01 June 01/06/2013 00:00:00 // 2013-06-01T12:32:30.0000000 01/06/2013 12:32:30 // 2013-06-01T12:32:30.0000000 01/06/2013 12:32:30 // Sat, 01 Jun 2013 12:32:30 GMT 01/06/2013 05:32:30 // Sat, 01 Jun 2013 12:32:30 GMT 01/06/2013 05:32:30 // 2013-06-01T12:32:30 01/06/2013 12:32:30 // 12:32 22/04/2013 12:32:00 // 12:32 22/04/2013 12:32:00 // 12:32 PM 22/04/2013 12:32:00 // 12:32 PM 22/04/2013 12:32:00 // 12:32:30 22/04/2013 12:32:30 // 12:32:30 22/04/2013 12:32:30 // 12:32:30 PM 22/04/2013 12:32:30 // 12:32:30 PM 22/04/2013 12:32:30 // 2013-06-01 12:32:30Z 01/06/2013 05:32:30 // 01 June 2013 19:32:30 01/06/2013 19:32:30 // 01 June 2013 19:32:30 01/06/2013 19:32:30 // 01 June 2013 07:32:30 PM 01/06/2013 19:32:30 // 01 June 2013 7:32:30 PM 01/06/2013 19:32:30 // 1 June 2013 19:32:30 01/06/2013 19:32:30 // 1 June 2013 19:32:30 01/06/2013 19:32:30 // 1 June 2013 07:32:30 PM 01/06/2013 19:32:30 // 1 June 2013 7:32:30 PM 01/06/2013 19:32:30 // June 2013 01/06/2013 00:00:00 // June 2013 01/06/2013 00:00:00
참고 : https://msdn.microsoft.com/ko-kr/library/System.DateTime(v=vs.110).aspx#parsing
참고 : https://msdn.microsoft.com/ko-kr/library/8kb3ddd4(v=vs.110).aspx // 사용자지정 날짜 및 시간 형식 문자열
@ 자료가 참 많다.
이건... 어떻게 쓸수가 없다.
무조건 사이트 참고하자.
예제
DateTime currentDate = DateTime.Now;
lblTime.Content = String.Format(currentDate.ToString("yyyy년MM월dd일 tthh시mm분ss.fffffff초"));
// 2017년01월01일 PM12시00분00.0000000초
// yyyy년MM월dd일 tthh시mm분ss.fffffff초 < tt : (AM/PM), hh/HH 12시간 or 24시간기준 >
오늘날짜
DateTime.Now.ToString("yyyy년MM월dd일 tthh시mm분ss.fffffff초");
http://insurang.tistory.com
728x90
반응형
'Programing (프로그래밍) > WPF & C# (C Sharp)' 카테고리의 다른 글
WPF & C# - 인터넷 사용 가능 여부 ( 네트워크 / Network / internet / 접속 / TCP / ip / url / 포트 / port) (0) | 2017.11.17 |
---|---|
[WPF & C# (C Sharp)] 크롬웹브라우저 삽입하기 - cefsharp / Form (9) | 2017.11.15 |
[ WPF & C# (C Sharp)] - FTP 업로드 / 다운로드 (10) | 2017.11.07 |
[ WPF & C# (C Sharp)] - installer 인스톨러 setup (2) | 2017.11.01 |
[ WPF & C# (C Sharp)] - 파일 만든 수정한 액세스 날짜 (2) | 2017.10.31 |
[ WPF & C# (C Sharp)] - 다운로드 WebClient 방식 / Download (0) | 2017.10.30 |
WPF & C# - ini 파일 내 방식대로 읽기 ( ini / cfg / config / txt / sector / 섹터 ) (0) | 2017.10.30 |
[ WPF & C# (C Sharp)] - Lib.cs Lib.dll 만들기 (0) | 2017.10.27 |