Post
by Jan Vooijs » Fri Feb 24, 2006 5:24 pm
Dare2,
Well BasicA did not have the date calculus!! So
I used TP (from 1.0 till 7.0 allthough tje latter was BP not TP)
Subtracting 1970 from the date is a bit of a problem since it is a string!!! Better would be an other function. Or this way:
Code: Select all
date1=ParseDate("%yyyy/%mm/%dd", "2004/03/01")
date2=ParseDate("%yyyy/%mm/%dd", "2006/01/24")
date_bet=date2-date1
Debug date_bet
Text.s = FormatDate( "%yyyy/%mm/%dd", Date_bet)
Debug Text.s
Debug Year( Date_bet) - 1970
Debug Month( Date_Bet)
Debug Day( Date_bet)
; or :
Debug "Years...: " + Str( Year( Date_bet) - 1970)
Debug "Months..: " + Str( Month( Date_Bet))
Debug "Days....: " + Str( Day( Date_bet))
Cheers,
Jan V.
Life goes to Fast, Enjoy!!
PB 4 is to good to be true, wake up man it is NOT a dream THIS is a reality!!!
AMD Athlon on 1.75G, 1Gb ram, 160Gb HD, NVidia FX5200, NEC ND-3500AG DVD+RW and CD+RW, in a Qbic EO3702A and Win XP Pro SP2 (registered)