SQL Commands

From Fundamental Ramen
Revision as of 01:56, 10 June 2019 by Tacoball (talk | contribs) (Created page with "== SQLite 3 == {| class="wikitable" ! TODO || Command |- | yyyymmdd to yyyy-mm-dd | SELECT printf('%s-%s-%s', SUBSTR(trading_date,1,4), SUBSTR(trading_date,5,2), SUBSTR(...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

SQLite 3

TODO Command
yyyymmdd to yyyy-mm-dd

SELECT printf('%s-%s-%s',

 SUBSTR(trading_date,1,4),
 SUBSTR(trading_date,5,2),
 SUBSTR(trading_date,7,2)

) FROM short_sell WHERE trading_date='20190605';