Create a view and convert numeric field into data field
Results 1 to 4 of 4

Thread: Create a view and convert numeric field into data field

  1. #1
    Join Date
    Apr 2013
    Posts
    39

    Create a view and convert numeric field into data field

    Hello,

    I am using SQL Server 2008 I want to create a view. I have a field call inv_date and is numeric, a date field yymmdd what I want to do is convert it into mm/dd/yyyy and call the field Invoice_Date. I try to google in how to convert, but everything is from yyyymmdd format not yymmdd. All I want to do is to type in my view a date for example: Between 1/1/2016 and 6/24/2016. Any tip will be appreciated. Thank you in advance.

  2. #2
    Join Date
    Sep 2002
    Posts
    5,938
    You can use style 101 in convert function for that format.

  3. #3
    Join Date
    Apr 2013
    Posts
    39
    Thanks, but what is the code. Thank you.

    Quote Originally Posted by rmiao View Post
    You can use style 101 in convert function for that format.

  4. #4
    Join Date
    Sep 2002
    Posts
    5,938
    Books online has detailed syntax and sample code.

Posting Permissions

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