Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: date

From   Roger Newson <>
Subject   Re: st: date
Date   Wed, 17 Sep 2003 16:04:11 +0100

At 16:36 17/09/03 +0200, Fabio Berton wrote (in reply to Malak B Bokhari):
you can try with the string function -substr-
Hope this helps!
Another helpful utility is -split-, which can split the string date into 3 parts, the third of which can be read using the -string- function. See on-line help for -split-.

Alternatively, Malak might use the -date- function and the -year- function. These are covered in -[U] 16.3.3 Date functions-.

My own -strdate- utility, downloadable from SSC, might also be useful. Type
ssc desc strdate
in Stata to find out more.

I hope this helps.


Roger Newson
Lecturer in Medical Statistics
Department of Public Health Sciences
King's College London
5th Floor, Capital House
42 Weston Street
London SE1 3QD
United Kingdom

Tel: 020 7848 6648 International +44 20 7848 6648
Fax: 020 7848 6620 International +44 20 7848 6620
or 020 7848 6605 International +44 20 7848 6605

Opinions expressed are those of the author, not the institution.

* For searches and help try:

© Copyright 1996–2022 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index