Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

Re: st: Bug with date(.,.) function?


From   Mattia Landoni <[email protected]>
To   [email protected]
Subject   Re: st: Bug with date(.,.) function?
Date   Thu, 12 Apr 2012 11:57:20 -0400

Thank you Dimitriy,

But I don't really have a problem to solve. I just wanted to point out
an inconsistency that is very likely undesired.

the second input to the date(.,.) function must be in capital letters
(DMY) most of the time, but when it is used as an IF argument, it
should be in small letters (dmy). I lost an hour to fix this.

On Thu, Apr 12, 2012 at 9:11 AM, Dimitriy V. Masterov
<[email protected]> wrote:
> Try -tsline jpod if date >=  td(01apr2011)-. This assumes that your
> date variable is formatted as as a td variable, that is, as days since
> 01jan1960, where 01jan1960 = 0.
>
> DVM
>
> On Thu, Apr 12, 2012 at 1:27 AM, Mattia Landoni
> <[email protected]> wrote:
>> Good morning, good people.
>>
>> I was trying to plot a chart of some quantity and I discovered the following.
>>
>> . dis date("01apr2011","DMY")
>> 18718
>> . dis date("01apr2011","dmy")
>> .
>>
>> So far, so good. However, when using the tsline plot, it behaves the
>> opposite way:
>>
>> . tsline jpod if date >=  date("01apr2011","dmy")
>> <correct graph>
>> . tsline jpod if date >=  date("01apr2011","DMY")
>> <blank graph>
>>
>> I am using Stata 11 64bit on Win7. Any idea of whether this is fixable?
>>
>> --
>> Mattia Landoni
>> +1 217 4-A-QUANT (from US)
>> +39 02 3206 21676 (from Italy)
>> GMT -05:00 (US East)
>> *
>> *   For searches and help try:
>> *   http://www.stata.com/help.cgi?search
>> *   http://www.stata.com/support/statalist/faq
>> *   http://www.ats.ucla.edu/stat/stata/
>
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/



-- 
Mattia Landoni
+1 217 4-A-QUANT (from US)
+39 02 3206 21676 (from Italy)
GMT -05:00 (US East)

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index