Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.time.LocalDateTime
- import java.time.format.DateTimeFormatter
- import java.util.Locale
- fun main(args: Array<String>) {
- val formato = DateTimeFormatter.ofPattern("dd-MM-yyyy hh:mm:ss a",
- Locale.ENGLISH)
- val fechayhora = LocalDateTime.now().format(formato)
- println("La fecha y hora actual es: $fechayhora")
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement