[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: RE: Extracting Time from Excel Sheet

From   "Nick Cox" <>
To   <>
Subject   st: RE: Extracting Time from Excel Sheet
Date   Tue, 24 Feb 2009 13:56:23 -0000

It is unclear what you are doing wrong. In principle, -substr()- is

In addition to other excellent suggestions, note that -split- is
customised for this kind of task. See the help for relevant examples. 


I want to extract the time from v1
Sep/09/1998 08:42:00 PM
where v1 is
str24  %24s
However, all I can extract is
08:42:00 PM
when using substr.
I would like to extract the hours (eg 8) and PM or AM.

*   For searches and help try:

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