Skip

There may be some confusion, The val has to be in List format. Your olist is
an oref and not a list.

s val=$LB("21/10/2003","30/05/2004","29/07/2004")

A) w ##class(%ListOfDataTypes).LogicalToDisplay(val,":")
21/10/2003:30/05/2004:29/07/2004

B) w ##class(%ListOfDataTypes).LogicalToDisplay(val)
21/10/2003
30/05/2004
29/07/2004

* Here the default delimiter is $CHAR(13,10)

C) w ##class(%ListOfDataTypes).LogicalToOdbc(val)
21/10/2003,30/05/2004,29/07/2004

HTH

Regards
Sukesh Hoogan


Skip Hill <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I'm wrestling with the LogicalToDisplay and LogicalToOdbc methods, and I
must be
> missing something.
>
> This works with a %Date
>
> USER>set odate = "08/19/2004"
> USER>w ##class(%Date).DisplayToLogical(odate)
> 59766
> USER>set odate = 59766
> USER>w ##class(%Date).LogicalToDisplay(odate)
> 08/19/2004
> USER>w ##class(%Date).LogicalToOdbc(odate)
> 2004-08-19
>
> But when I use the same approach with %ListOfDataTypes, it does not, what
am I
> doing wrong here?
>
> USER>set olist = ##class(%ListOfDataTypes).%New()
> USER>do olist.Insert("a")
> USER>do olist.Insert("b")
> USER>do olist.Insert("c")
> USER>w olist.Count()
> 3
> USER>w olist.GetAt(2)
> b
> USER>w ##class(%ListOfDataTypes).LogicalToDisplay(olist)
>
> <LIST>zLogicalToDisplay+1^%ooLibrary.ListOfDataTypes.1
> USER 3f2>quit
>
> USER>w ##class(%ListOfDataTypes).LogicalToOdbc(olist)
>
> <LIST>zLogicalToOdbc+1^%ooLibrary.ListOfDataTypes.1
> USER 3f2>
>
> Any help will be appreciated
> Skip
>



Reply via email to