Question d’entretien chez J.P. Morgan

How to extract month variable from YYYYMMDD string