Database Patterns

Notes on PostgreSQL

Pages

  • Home
  • Quick Links

Wednesday, July 27, 2016

Crush Tools convdate

Convert dates on the command line
$ echo '7-25-2015-12:12:12' | convdate --verbose
2016-07-25-12:12:12
$ echo '7/25/16' | convdate --verbose -i '%m/%d/%y' -o '%Y-%m-%d'
2016-07-25

where
i is the input format, as per http://pubs.opengroup.org/onlinepubs/009695399/functions/strptime.html 
o is the output format, as per http://pubs.opengroup.org/onlinepubs/009695399/functions/strftime.html
Posted by Neil McGuigan at 5:00 PM
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

Search This Blog

Labels

postgres

Popular Posts

About Me

Neil McGuigan
View my complete profile

Blog Archive

  • ►  2017 (4)
    • ►  September (3)
    • ►  August (1)
  • ▼  2016 (6)
    • ▼  July (4)
      • Crush Tools convdate
      • Crush Tools subtotal
      • Easy XPath against HTML
      • Crush Tools dbstream with PostgreSQL
    • ►  May (1)
    • ►  January (1)
  • ►  2015 (6)
    • ►  December (2)
    • ►  August (1)
    • ►  April (1)
    • ►  March (2)
  • ►  2014 (32)
    • ►  December (4)
    • ►  November (1)
    • ►  August (9)
    • ►  July (7)
    • ►  June (3)
    • ►  April (1)
    • ►  March (1)
    • ►  February (3)
    • ►  January (3)
  • ►  2013 (2)
    • ►  November (1)
    • ►  August (1)
  • ►  2012 (1)
    • ►  August (1)
Simple theme. Powered by Blogger.