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

Part 2: Potential Y2K bugs: date conversions ASCII files



PureBytes Links

Trading Reference Links


The date is presented in a fashion that by the definition above is y2k
compliant. Note as well that the date is also presented in an alternative y2k
compliant format in the Volume field.  The OHLC is dummy data that is
sequential.  The reason for this is that I discovered that if you present data
in an ASCII file that includes weekends, the data is not parsed correctly. 
Hence, the data presented above was developed in Excel in light of this and
weekend dates were avoided in Excel although the interpretation of these dates
in nonweekend dates is not assured in TradeStation 4.

(As an aside there seems to be a date problem when exporting
functions/indicators from the PowerEditor.  Itnever seems to know that the file
is the current version and asks you if you want to continue.)


I then wrote a little program that merely writes to file the original data and
some results of the date functions. Here is a sample of the results:

06/30/2079 = ELdatetoString(date)
   1790630 = numtostr( date,0 ) = sDate 
   25 = DateToJulian( strtonum(sdate) = djsDate
   25 = DateToJulian( date ) = djdate
   06/30/2079 = JulianToDate( djDate ) = jddate
   25 = dj2date = DateToJulian( jddate ) = dj2date
   19000104 = volume = Actual Date In ASCII file 
   0 = DatetoJulian(volume) = vdjdate
   0 = juliantodate(Vdjdate) = vjddate
   1.1 ,  1.1 ,  1.1 ,  1.1
07/30/2079 = ELdatetoString(date)
   1790730 = numtostr( date,0 ) = sDate 
   55 = DateToJulian( strtonum(sdate) = djsDate
   55 = DateToJulian( date ) = djdate
   07/30/2079 = JulianToDate( djDate ) = jddate
   55 = dj2date = DateToJulian( jddate ) = dj2date
   19000202 = volume = Actual Date In ASCII file 
   0 = DatetoJulian(volume) = vdjdate
   0 = juliantodate(Vdjdate) = vjddate
   2.1 ,  2.1 ,  2.1 ,  2.1
08/31/2079 = ELdatetoString(date)
   1790831 = numtostr( date,0 ) = sDate 
   87 = DateToJulian( strtonum(sdate) = djsDate
   87 = DateToJulian( date ) = djdate
   08/31/2079 = JulianToDate( djDate ) = jddate
   87 = dj2date = DateToJulian( jddate ) = dj2date
   19000306 = volume = Actual Date In ASCII file 
   0 = DatetoJulian(volume) = vdjdate
   0 = juliantodate(Vdjdate) = vjddate
   3.1 ,  3.1 ,  3.1 ,  3.1
09/30/2079 = ELdatetoString(date)
   1790930 = numtostr( date,0 ) = sDate 
   117 = DateToJulian( strtonum(sdate) = djsDate
   117 = DateToJulian( date ) = djdate
   09/30/2079 = JulianToDate( djDate ) = jddate
   117 = dj2date = DateToJulian( jddate ) = dj2date
   19000404 = volume = Actual Date In ASCII file 
   0 = DatetoJulian(volume) = vdjdate
   0 = juliantodate(Vdjdate) = vjddate
   4.1 ,  4.1 ,  4.1 ,  4.1
10/29/2079 = ELdatetoString(date)
   1791029 = numtostr( date,0 ) = sDate 
   146 = DateToJulian( strtonum(sdate) = djsDate
   146 = DateToJulian( date ) = djdate
   10/29/2079 = JulianToDate( djDate ) = jddate
   146 = dj2date = DateToJulian( jddate ) = dj2date
   19000508 = volume = Actual Date In ASCII file 
   0 = DatetoJulian(volume) = vdjdate
   0 = juliantodate(Vdjdate) = vjddate
   5.1 ,  5.1 ,  5.1 ,  5.1
11/30/2079 = ELdatetoString(date)
   1791130 = numtostr( date,0 ) = sDate 
   178 = DateToJulian( strtonum(sdate) = djsDate
   178 = DateToJulian( date ) = djdate
   11/30/2079 = JulianToDate( djDate ) = jddate
   178 = dj2date = DateToJulian( jddate ) = dj2date
   19000608 = volume = Actual Date In ASCII file 
   0 = DatetoJulian(volume) = vdjdate
   0 = juliantodate(Vdjdate) = vjddate
   6.1 ,  6.1 ,  6.1 ,  6.1
12/31/2079 = ELdatetoString(date)
   1791231 = numtostr( date,0 ) = sDate 
   209 = DateToJulian( strtonum(sdate) = djsDate
   209 = DateToJulian( date ) = djdate
   12/31/2079 = JulianToDate( djDate ) = jddate
   209 = dj2date = DateToJulian( jddate ) = dj2date
   19000710 = volume = Actual Date In ASCII file 
   0 = DatetoJulian(volume) = vdjdate
   0 = juliantodate(Vdjdate) = vjddate
   7.1 ,  7.1 ,  7.1 ,  7.1
01/31/2080 = ELdatetoString(date)
   1800131 = numtostr( date,0 ) = sDate 
   240 = DateToJulian( strtonum(sdate) = djsDate
   240 = DateToJulian( date ) = djdate
   01/31/2080 = JulianToDate( djDate ) = jddate
   240 = dj2date = DateToJulian( jddate ) = dj2date
   19000808 = volume = Actual Date In ASCII file 
   0 = DatetoJulian(volume) = vdjdate
   0 = juliantodate(Vdjdate) = vjddate
   8.1 ,  8.1 ,  8.1 ,  8.1
02/29/2080 = ELdatetoString(date)
   1800229 = numtostr( date,0 ) = sDate 
   269 = DateToJulian( strtonum(sdate) = djsDate
   269 = DateToJulian( date ) = djdate
   02/29/2080 = JulianToDate( djDate ) = jddate
   269 = dj2date = DateToJulian( jddate ) = dj2date
   19000912 = volume = Actual Date In ASCII file 
   0 = DatetoJulian(volume) = vdjdate
   0 = juliantodate(Vdjdate) = vjddate
   9.1 ,  9.1 ,  9.1 ,  9.1
03/31/2080 = ELdatetoString(date)
   1800331 = numtostr( date,0 ) = sDate 
   300 = DateToJulian( strtonum(sdate) = djsDate
   300 = DateToJulian( date ) = djdate
   03/31/2080 = JulianToDate( djDate ) = jddate
   300 = dj2date = DateToJulian( jddate ) = dj2date
   19001012 = volume = Actual Date In ASCII file 
   0 = DatetoJulian(volume) = vdjdate
   0 = juliantodate(Vdjdate) = vjddate
   10.1 ,  10.1 ,  10.1 ,  10.1
04/28/2080 = ELdatetoString(date)
   1800428 = numtostr( date,0 ) = sDate 
   328 = DateToJulian( strtonum(sdate) = djsDate
   328 = DateToJulian( date ) = djdate
   04/28/2080 = JulianToDate( djDate ) = jddate
   328 = dj2date = DateToJulian( jddate ) = dj2date
   19001112 = volume = Actual Date In ASCII file 
   0 = DatetoJulian(volume) = vdjdate
   0 = juliantodate(Vdjdate) = vjddate
   11.1 ,  11.1 ,  11.1 ,  11.1
05/31/2080 = ELdatetoString(date)
   1800531 = numtostr( date,0 ) = sDate 
   361 = DateToJulian( strtonum(sdate) = djsDate
   361 = DateToJulian( date ) = djdate
   05/31/2080 = JulianToDate( djDate ) = jddate
   361 = dj2date = DateToJulian( jddate ) = dj2date
   19001212 = volume = Actual Date In ASCII file 
   0 = DatetoJulian(volume) = vdjdate
   0 = juliantodate(Vdjdate) = vjddate
   12.1 ,  12.1 ,  12.1 ,  12.1
13/31/1901 = ELdatetoString(date)
   10131 = numtostr( date,0 ) = sDate 
   397 = DateToJulian( strtonum(sdate) = djsDate
   397 = DateToJulian( date ) = djdate
   13/31/1901 = JulianToDate( djDate ) = jddate
   397 = dj2date = DateToJulian( jddate ) = dj2date
   19010116 = volume = Actual Date In ASCII file 
   0 = DatetoJulian(volume) = vdjdate
   0 = juliantodate(Vdjdate) = vjddate
   13.1 ,  13.1 ,  13.1 ,  13.1
22/28/1901 = ELdatetoString(date)
   10228 = numtostr( date,0 ) = sDate 
   425 = DateToJulian( strtonum(sdate) = djsDate
   425 = DateToJulian( date ) = djdate
   22/28/1901 = JulianToDate( djDate ) = jddate
   425 = dj2date = DateToJulian( jddate ) = dj2date
   19010214 = volume = Actual Date In ASCII file 
   0 = DatetoJulian(volume) = vdjdate
   0 = juliantodate(Vdjdate) = vjddate
   14.1 ,  14.1 ,  14.1 ,  14.1
32/29/1901 = ELdatetoString(date)
   10329 = numtostr( date,0 ) = sDate 
   454 = DateToJulian( strtonum(sdate) = djsDate
   454 = DateToJulian( date ) = djdate
   32/29/1901 = JulianToDate( djDate ) = jddate
   454 = dj2date = DateToJulian( jddate ) = dj2date
   19010320 = volume = Actual Date In ASCII file 
   0 = DatetoJulian(volume) = vdjdate
   0 = juliantodate(Vdjdate) = vjddate
   15.1 ,  15.1 ,  15.1 ,  15.1
43/30/1901 = ELdatetoString(date)
   10430 = numtostr( date,0 ) = sDate 
   486 = DateToJulian( strtonum(sdate) = djsDate
   486 = DateToJulian( date ) = djdate
   43/30/1901 = JulianToDate( djDate ) = jddate
   486 = dj2date = DateToJulian( jddate ) = dj2date
   19010418 = volume = Actual Date In ASCII file 
   0 = DatetoJulian(volume) = vdjdate
   0 = juliantodate(Vdjdate) = vjddate
   16.1 ,  16.1 ,  16.1 ,  16.1
53/31/1901 = ELdatetoString(date)
   10531 = numtostr( date,0 ) = sDate 
   517 = DateToJulian( strtonum(sdate) = djsDate
   517 = DateToJulian( date ) = djdate
   53/31/1901 = JulianToDate( djDate ) = jddate
   517 = dj2date = DateToJulian( jddate ) = dj2date
   19010520 = volume = Actual Date In ASCII file 
   0 = DatetoJulian(volume) = vdjdate
   0 = juliantodate(Vdjdate) = vjddate
   17.1 ,  17.1 ,  17.1 ,  17.1
62/28/1901 = ELdatetoString(date)
   10628 = numtostr( date,0 ) = sDate 
   545 = DateToJulian( strtonum(sdate) = djsDate
   545 = DateToJulian( date ) = djdate
   62/28/1901 = JulianToDate( djDate ) = jddate
   545 = dj2date = DateToJulian( jddate ) = dj2date
   19010620 = volume = Actual Date In ASCII file 
   0 = DatetoJulian(volume) = vdjdate
   0 = juliantodate(Vdjdate) = vjddate
   18.1 ,  18.1 ,  18.1 ,  18.1
73/31/1901 = ELdatetoString(date)
   10731 = numtostr( date,0 ) = sDate 
   578 = DateToJulian( strtonum(sdate) = djsDate
   578 = DateToJulian( date ) = djdate
   73/31/1901 = JulianToDate( djDate ) = jddate
   578 = dj2date = DateToJulian( jddate ) = dj2date
   19010724 = volume = Actual Date In ASCII file 
   0 = DatetoJulian(volume) = vdjdate
   0 = juliantodate(Vdjdate) = vjddate
   19.1 ,  19.1 ,  19.1 ,  19.1
83/30/1901 = ELdatetoString(date)
   10830 = numtostr( date,0 ) = sDate 
   608 = DateToJulian( strtonum(sdate) = djsDate
   608 = DateToJulian( date ) = djdate
   83/30/1901 = JulianToDate( djDate ) = jddate
   608 = dj2date = DateToJulian( jddate ) = dj2date
   19010822 = volume = Actual Date In ASCII file 
   0 = DatetoJulian(volume) = vdjdate
   0 = juliantodate(Vdjdate) = vjddate
   20.1 ,  20.1 ,  20.1 ,  20.1
93/30/1901 = ELdatetoString(date)
   10930 = numtostr( date,0 ) = sDate 
   639 = DateToJulian( strtonum(sdate) = djsDate
   639 = DateToJulian( date ) = djdate
   93/30/1901 = JulianToDate( djDate ) = jddate
   639 = dj2date = DateToJulian( jddate ) = dj2date
   19010924 = volume = Actual Date In ASCII file 
   0 = DatetoJulian(volume) = vdjdate
   0 = juliantodate(Vdjdate) = vjddate
   21.1 ,  21.1 ,  21.1 ,  21.1
03/31/1901 = ELdatetoString(date)
   11031 = numtostr( date,0 ) = sDate 
   670 = DateToJulian( strtonum(sdate) = djsDate
   670 = DateToJulian( date ) = djdate
   03/31/1901 = JulianToDate( djDate ) = jddate
   670 = dj2date = DateToJulian( jddate ) = dj2date
   19011024 = volume = Actual Date In ASCII file 
   0 = DatetoJulian(volume) = vdjdate
   0 = juliantodate(Vdjdate) = vjddate
   22.1 ,  22.1 ,  22.1 ,  22.1
12/29/1901 = ELdatetoString(date)
   11129 = numtostr( date,0 ) = sDate 
   699 = DateToJulian( strtonum(sdate) = djsDate
   699 = DateToJulian( date ) = djdate
   12/29/1901 = JulianToDate( djDate ) = jddate
   699 = dj2date = DateToJulian( jddate ) = dj2date
   19011126 = volume = Actual Date In ASCII file 
   0 = DatetoJulian(volume) = vdjdate
   0 = juliantodate(Vdjdate) = vjddate
   23.1 ,  23.1 ,  23.1 ,  23.1
23/31/1901 = ELdatetoString(date)
   11231 = numtostr( date,0 ) = sDate 
   731 = DateToJulian( strtonum(sdate) = djsDate
   731 = DateToJulian( date ) = djdate
   23/31/1901 = JulianToDate( djDate ) = jddate
   731 = dj2date = DateToJulian( jddate ) = dj2date
   19011226 = volume = Actual Date In ASCII file 
   0 = DatetoJulian(volume) = vdjdate
   0 = juliantodate(Vdjdate) = vjddate
   24.1 ,  24.1 ,  24.1 ,  24.1
13/31/1902 = ELdatetoString(date)
   20131 = numtostr( date,0 ) = sDate 
   762 = DateToJulian( strtonum(sdate) = djsDate
   762 = DateToJulian( date ) = djdate
   13/31/1902 = JulianToDate( djDate ) = jddate
   762 = dj2date = DateToJulian( jddate ) = dj2date
   19020128 = volume = Actual Date In ASCII file 
   0 = DatetoJulian(volume) = vdjdate
   0 = juliantodate(Vdjdate) = vjddate
   25.1 ,  25.1 ,  25.1 ,  25.1
22/28/1902 = ELdatetoString(date)
   20228 = numtostr( date,0 ) = sDate 
   790 = DateToJulian( strtonum(sdate) = djsDate
   790 = DateToJulian( date ) = djdate
   22/28/1902 = JulianToDate( djDate ) = jddate
   790 = dj2date = DateToJulian( jddate ) = dj2date
   19020228 = volume = Actual Date In ASCII file 
   0 = DatetoJulian(volume) = vdjdate
   0 = juliantodate(Vdjdate) = vjddate
   26.1 ,  26.1 ,  26.1 ,  26.1
43/30/1902 = ELdatetoString(date)
   20430 = numtostr( date,0 ) = sDate 
   851 = DateToJulian( strtonum(sdate) = djsDate
   851 = DateToJulian( date ) = djdate
   43/30/1902 = JulianToDate( djDate ) = jddate
   851 = dj2date = DateToJulian( jddate ) = dj2date
   19020400 = volume = Actual Date In ASCII file 
   0 = DatetoJulian(volume) = vdjdate
   0 = juliantodate(Vdjdate) = vjddate
   27.1 ,  27.1 ,  27.1 ,  27.1
53/30/1902 = ELdatetoString(date)
   20530 = numtostr( date,0 ) = sDate 
   881 = DateToJulian( strtonum(sdate) = djsDate
   881 = DateToJulian( date ) = djdate
   53/30/1902 = JulianToDate( djDate ) = jddate
   881 = dj2date = DateToJulian( jddate ) = dj2date
   19020500 = volume = Actual Date In ASCII file 
   0 = DatetoJulian(volume) = vdjdate
   0 = juliantodate(Vdjdate) = vjddate
   28.1 ,  28.1 ,  28.1 ,  28.1