Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- Migrate
- Visual Studio Code
- RUBY
- change_column_null
- Time.znoe.now
- ruby #string #strip #split #gsub
- install
- change_column
- 사용중인포트검색
- 이것이 자바다
- Kotlin
- 설치
- 주차장 시스템
- Orange Pi 3B
- 우분투 24
- Ruby on Rails
- ubuntu
- bulma
- Java
- 우분투
- 쿠버네티스
- mac
- docker
- MySQL
- after_save
- Rails
- with_indifferent_access
- after_update
- docket
- 오랜지파이
Archives
- Today
- Total
중고 신입이 개발해보기..
Time.zone.now 본문
time = Time.zone.now
=> Fri, 20 Aug 2021 03:26:04 KST +09:00
time.to_date.to_formatted_s(:number)
=> "20210820"
time.to_datetime.to_formatted_s(:number)
=> "20210820032604"
time.to_time.to_formatted_s(:number)
=> "20210820032604"
Time.zone.now.strftime('%Y-%m-%d %H:%M:%S')
=> "2021-08-20 03:41:33"
Time.zone.now.strftime("%Y%m%d")
=> "20210820"
Time.zone.now.strftime("%H%M%S")
=> "034352"
'Back-End > Ruby On Rails' 카테고리의 다른 글
레일즈 디비 설정 변경 (0) | 2022.03.17 |
---|---|
배열 정렬 (0) | 2021.09.23 |
Rails Migration 사용 (0) | 2021.04.30 |
Rails + Heroku 배포하기 (0) | 2021.02.05 |
with_indifferent_access Hash 접근시 . 심블, 스트링 다 가능하게.. (0) | 2020.10.29 |
Comments