On Sun, 18 Oct 2009, Francesco Saverio Giudice wrote: Hi,
> could you kindly add these functions ? > HB_TTOD( tTimeStamp ) -> dDate I'll add it though it's interesting to know why you need it. You can you tTimeStamp instead of dDate in all places so if you found something in core code which needs date parameter and does not accept timestamp then I would like to know what it is. BTW xHarbour does not have DATE type at all. Though valtype() returns "D" then it uses internally only TIMESTAMP and I haven't seen that people protested against it. > Now if I have a timestamp value I need to make: > CTOD( HB_DTOC( tTimeStamp ) ) -> dDate > or better: > STOD( HB_TTOS( tTimeStamp ) ) -> dDate More efficient is: function HB_TTOD( tTimeStamp ) return HB_CTOD( "" ) + HB_TTON( tTimeStamp ) > HB_TTOT( tTimeStamp ) -> cTime Here the name is confusing. I though that you need function which works like: function HB_TTOT( tTimeStamp ) return HB_NTOT( HB_TTON( tTimeStamp ) % 1 ) which returns timestamp value which contains only the time in a day without days but then I've seen your example which returns time string: > HB_TTOC( tTimeStamp, "", "HH:MM:SS" ) -> cTime So we need other name for such function and there is still question what is wrong with above conversion and why you do not want to use HB_TTOC(). As far as I know no one suggested to add to core code functions like: HB_DTOANSI( dDate ) -> "YY.MM.DD" or: HB_DTOBRITISH( dDate ) -> "dd/mm/yy" which give such functionality but for date values and people preferred functions like HB_DTOC() with additional format parameter. best regards, Przemek _______________________________________________ Harbour mailing list Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour