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

    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


    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 12: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