Notice
Recent Posts
Recent Comments
Link
목록timestamp (1)
SeouliteLab
[Python/파이썬] datetime에서 Timestamp(millisecond) 가져오기
파이썬의 datetime 모듈을 사용하여 현재 시간을 Timestamp 형식으로 가져오는 방법을 알아보겠습니다. Timestamp는 일반적으로 1970년 1월 1일 00:00:00 UTC(협정 세계시)로부터 경과한 시간을 나타내는 숫자입니다. 여기서는 밀리초(millisecond) 단위의 Timestamp를 가져오는 방법에 대해 다룹니다. 1. datetime 모듈을 사용하여 현재 시간 가져오기 datetime 모듈을 사용하여 현재 시간을 가져옵니다. datetime.now() 메서드를 사용하면 현재 시간을 datetime 객체로 가져올 수 있습니다. import datetime now = datetime.datetime.now() print("현재 시간:", now) 2. Timestamp로 변환하기 ..
프로그래밍
2024. 3. 3. 23:03