Monthly Archives: December 2015

Incorporating SQL in Stata code

Here is a snippet of code showing how one can include SQL in Stata code (I assume that the ODBC connection has been set up). #delimit ; local sql ” SELECT * FROM director_bio.directorship_results WHERE non_match AND start_date < date_filed … Continue reading

Posted in PostgreSQL, Stata, Uncategorized | Tagged , , | Leave a comment

Playing with times in Python

from datetime import datetime from pytz import timezone, utc pacific = timezone(‘US/Pacific’) gemma_bd = datetime(2007, 8, 27, 7, 45) gemma_bd = pacific.localize(gemma_bd, is_dst=True) print(utc.localize(datetime.utcnow()) – gemma_bd)

Posted in Uncategorized | Leave a comment