首页> 外文期刊>The stata journal >Stata tip 98: Counting substrings within strings
【24h】

Stata tip 98: Counting substrings within strings

机译:Stata技巧98:计算字符串中的子字符串

获取原文
获取原文并翻译 | 示例
获取外文期刊封面目录资料

摘要

Consider the following problem, based on a real one reported on Statalist. A user has string date-times in differing forms; let us imagine they are in a variable, sdate. The desire is for everything to be DMY hms-that is, day, month, year, space, hours, minutes, and seconds. Examples of data are "25/12/2010 11:22" "25/12/2010 11:22:33" "25/12/2010 11:22:33:444" Compared with the standard, the first example lacks seconds; the second example is fine; and the third example includes milliseconds, but expressed in a nonstandard way. Stata expects seconds and milliseconds in the decimal form "33.444".
机译:考虑到以下问题,这些问题基于“ Statalist”上报告的真实问题。用户具有不同形式的字符串日期时间。让我们想象一下它们处于变量sate中。要求所有东西都为DMY hms,即天,月,年,空间,小时,分钟和秒。数据示例为“ 25/12/2010 11:22”“ 25/12/2010 11:22:33”“ 25/12/2010 11:22:33:444”与标准相比,第一个示例缺少秒;第二个例子很好;第三个示例包括毫秒,但以非标准方式表示。 Stata期望以十进制形式“ 33.444”表示秒和毫秒。

著录项

  • 来源
    《The stata journal》 |2011年第2期|p.318-320|共3页
  • 作者

    Nicholas J. Cox;

  • 作者单位

    Department of Geography Durham University Durham, UK;

  • 收录信息
  • 原文格式 PDF
  • 正文语种 eng
  • 中图分类
  • 关键词

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号