Convert nvarchar to smalldatetime

Discussion in 'ASP General' started by Joey Martin, May 19, 2005.

  1. Joey Martin

    Joey Martin Guest

    How do I convert an nvarchar field to smalldatetime format?

    My nvarcharfield (saledatetext) is in the format YYYY-MM-DD.

    I want to convert is to smalldatetime (field: saledate)

    Thanks for the help

    *** Sent via Developersdex http://www.developersdex.com ***
     
    Joey Martin, May 19, 2005
    #1
    1. Advertising

  2. CONVERT(DATETIME, saledatetext, 120)

    Note that the third parameter (which indicates date format) is not strictly
    necessary when using yyyy-mm-dd, but it is when using formats that can be
    ambiguous.


    -Mark



    "Joey Martin" <> wrote in message
    news:%...
    > How do I convert an nvarchar field to smalldatetime format?
    >
    > My nvarcharfield (saledatetext) is in the format YYYY-MM-DD.
    >
    > I want to convert is to smalldatetime (field: saledate)
    >
    > Thanks for the help
    >
    > *** Sent via Developersdex http://www.developersdex.com ***
     
    Mark J. McGinty, May 20, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Salim Afþar
    Replies:
    1
    Views:
    1,719
  2. Fred Nelson

    SmallDateTime and NULL Values

    Fred Nelson, Mar 2, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    560
    Natty Gur
    Mar 2, 2004
  3. Pat

    smalldatetime problem

    Pat, Aug 31, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    3,996
    =?Utf-8?B?TWlsb3N6IFNrYWxlY2tp?=
    Sep 2, 2005
  4. =?Utf-8?B?Um9iZXJ0IFdpbGxoaXRl?=

    smalldatetime Null in SQL for ASP.net Page

    =?Utf-8?B?Um9iZXJ0IFdpbGxoaXRl?=, Oct 6, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    2,937
    Patirck Ige
    Oct 6, 2005
  5. .Net Sports

    Changing smalldatetime to string

    .Net Sports, Nov 18, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    3,705
    .Net Sports
    Nov 18, 2005
Loading...

Share This Page