[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Using a date in a condition

From   Herve STOLOWY <>
Subject   st: Using a date in a condition
Date   Wed, 20 Feb 2008 15:48:06 +0100

Dear Statalisters:

In a data set, one variable (fyr) is the date of the financial year end.
The current displayed format is, e.g., 31 Dec 04, 30 Jun 04, 30 Sep
05... When  I click on the year end, I see a figure (e.g., 16252). I
understood, reading the Stata documentation, that the format I am using
is that of elapsed dates. I understand the principle. 

I need to use the date as a condition in: 

replace year2 = 07 if fyr== 31 Dec 04

This does not work. (I also tried with quotes around the date). I guess
that it is because of the date format but can't find a solution in the
help file on dates.

Would you have any idea?

Best regards

Hervé Stolowy

President of the French Accounting Association
HEC Paris
Département Comptabilité Contrôle de gestion / Dept of Accounting and
Management Control
1, rue de la Liberation
78351 - Jouy-en-Josas
Tel: +33 1 39 67 94 42 - Fax: +33 1 39 67 70 86
mail: stolowy at hec dot fr

*   For searches and help try:

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