Join Slack
Powered by
How to get current local date and time in Kotlin?
# android
r
ramonsgds
10/29/2017, 11:26 PM
How to get current local date and time in Kotlin?
google
2
o
orangy
10/29/2017, 11:26 PM
But still, pretty please be specific to what problem you’re having.
orangy
10/29/2017, 11:26 PM
Presented like this it won’t have a good answer.
a
agrosner
10/30/2017, 1:12 AM
Also a simple Google search ...
v
Vishal
10/30/2017, 4:44 AM
val current = LocalDateTime.now()
Vishal
10/30/2017, 4:45 AM
for format of date and time use this code
Vishal
10/30/2017, 4:45 AM
val formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH
mm
ss.SSS") val formatted = current.format(formatter)
g
Greg Stepniewski
10/30/2017, 6:53 AM
If you’re asking for kotlin libraries for dealing with time, there are
https://github.com/debop/koda-time
,
https://github.com/soywiz/klock
and a more recent
https://github.com/kizitonwose/Time
52
Views
Open in Slack
Previous
Next