Werner

Since you are doing so much work with just the date, why not set up you class definitions to have two seperate properties, date and time, instead of a single timestamp property? Then you would be able to build an index on the date, which would be much faster than using the fn CONVERT, and you would only have to incorporate the time when you needed it?


Dipl.-Ing. Werner Riegler wrote:
Ben,

tahnks again - works,

but I still wonder why there is no Method from the Type Class offering this
converions
(internal format -> string format -> other string format -> other internal
format ?,
just wanted to convert a DateTime into a Date) ...

but as you showed me it is possible in SQL:
 *,{fn CONVERT(prop,SQL_DATE)}
and this time I really needed this one ;-)

Werner

"Ben Taylor" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
news:[EMAIL PROTECTED]

right. so if you want to convert between internal and external use format

3

s date = $ZDateTime($Horolog,3)
this is readable format, to return to $H format use:
s internalDate = $ZDateTimeH(date,3)

%Library.Date and %Library.TimeStamp aren't really the same.

Dipl.-Ing. Werner Riegler wrote:


sorry but it is sometimes funny not to find the right place in the docu

and

examples incl. the news group

there is a lot of this stuff

##class(%Library.TimeStamp).LogicalToDisplay and so an

but Timestamp seems to have yyyy-mm-dd ... format and

Date has dd/mm/yyyy

and even with

set dt = $ZDateTime($Horolog,3)

set t = ##class(%Library.TimeStamp).DisplayToLogical(dt)

set x = ##class(%Library.TimeStamp).LogicalToDisplay(t)

set y = $EXTRACT(x,1,10)

w ##class(%Library.Date).IsValidDT(y)

does not work ???

I think there is a very easy way to do this - but at the moment I can

not

find it ...

even in the class browser I can not find a mehtod or parameter to do

this

???

werner








Reply via email to