dateTime = Null problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jake

    #1

    dateTime = Null problem

    Hi All,

    I have an object that ahs a property of time dateTime,
    this property is set to the contents of a DateTime field
    in the database(SQL Server).

    The problem I am haveing is that if the dataabase field
    is Null and the object property is set to the contense of
    that field. And I then assign the object proberty to the
    value of a control the control value is set to 01/01/0001
    instead of "". Any ideas on how to acheive this?

    I can initialize teh value of the property to
    say "1/1/1900" and test for that but is the a neater way?

    And if i test for Isdate() i recieve an error.

    Thanks in advance

    Cheers Jake
  • Souri Challa

    #2
    Re: dateTime = Null problem

    Jake,

    You might want to retrieve it from the backend as
    'isnull(<databa sefieldname>,'0 1/01/1900')

    -Souri

    "Jake" <reachJake@hotm ail.com> wrote in message
    news:0fcc01c34c d2$0c2106c0$350 1280a@phx.gbl.. .[color=blue]
    > Hi All,
    >
    > I have an object that ahs a property of time dateTime,
    > this property is set to the contents of a DateTime field
    > in the database(SQL Server).
    >
    > The problem I am haveing is that if the dataabase field
    > is Null and the object property is set to the contense of
    > that field. And I then assign the object proberty to the
    > value of a control the control value is set to 01/01/0001
    > instead of "". Any ideas on how to acheive this?
    >
    > I can initialize teh value of the property to
    > say "1/1/1900" and test for that but is the a neater way?
    >
    > And if i test for Isdate() i recieve an error.
    >
    > Thanks in advance
    >
    > Cheers Jake[/color]


    Comment

    Working...