TechNote.kr

  • 홈
  • 태그

datetime 1

Python - datetime/time module, 현재 시간 출력 방법

datetime 혹은 time module 중 하나를 이용하여 현재 시간을 표시할 수 있다. 먼저 datetime 을 이용한 현재 시간 표현은 다음과 같다. import datetime now = datetime.datetime.now() print now 결과> $ python now_datetime.py 2018-06-05 10:30:06.986065 반면 time module을 이용하면 좀 더 세분화/정교화하여 표시할 수 있다. import time now = time.localtime() print "%04d/%02d/%02d %02d:%02d:%02d" % (now.tm_year, now.tm_mon, now.tm_mday, now.tm_hour, now.tm_min, now.tm_sec) 결과..

Language/Python 2018.06.16
1
더보기
  • TechNote.
    • Language
      • C
      • R
      • Java
      • Python
      • Kotlin
      • HTML
      • Javascript
      • nvd3.js
      • Node.js
    • Android
    • OS
      • Windows
      • Linux
      • Mac
      • OpenWRT, LEDE
    • Network
      • Wi-Fi
    • Products & Services
      • Django
      • AmazonWebService (AWS)
      • VirtualBox
      • Adsense
      • WordPress
      • Tistory
      • VS Code
      • Docker
    • Database
    • Application
      • KidsTube
      • Notepad++
    • Computer architecture
    • Software architecture
    • ETC

최근글과 인기글

  • 최근글
  • 인기글
  • [Javascript] var, let, const 비교 분석 2022.07.03 23:43
  • [Javascript] 코드 동작 확인 방법 2022.06.20 00:01
  • [Node.js] 설치 및 버전 확인 2022.06.19 23:56
  • [VSCODE] Prettier - Code formatter 설정 2021.09.26 16:41
  • [Docker][해결방법] Got permission denied while trying to connect to the Do⋯ 2021.02.15 15:44
  • [04-5] Python - 파일 존재(isfile), 디렉토리 존재(isdir) 확인 방법 2017.01.07 15:46

Copyright © Kakao Corp. All rights reserved.

티스토리툴바