-
-
Save tpitale/39e97ef1ca24e968dd35 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> result = Purchase.repository.adapter.select("SELECT transaction_time, transaction_time::text AS transaction_time_text FROM purchases WHERE id = 2460").first | |
> result.transaction_time_text.to_datetime.strftime("%L") # => "905" | |
> result.transaction_time.to_datetime.strftime("%L") # => "000" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment