Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2002
    Posts
    162

    Unanswered: convert (datetime,.....) question

    I have this statement in a subquery.

    select convert(datetime,'10/01/' + convert(varchar(4),datepart(yy, x.afp_month))) from tx_version x

    It only works when there are no null values in the afp_month column.
    Are there any suggestions or functions I could use with the convert function to get my results.

    The desired results look like this '10/01/2002', '10/01/2001 etc

  2. #2
    Join Date
    May 2002
    Posts
    11

    Smile

    U can make use of "CASE" statement (new feature)
    Can you reply what you would like sybase to return if afp_month is null?
    Last edited by rayvid123; 05-19-02 at 11:51.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •