Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7401451
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T04:28:16+00:00 2026-05-29T04:28:16+00:00

I have this stored Proc: ALTER Procedure [dbo].[GetWebinars] ( @GroupingCode varchar(max) = ‘AVM’, @ItemNumber

  • 0

I have this stored Proc:

ALTER Procedure [dbo].[GetWebinars]
(
    @GroupingCode varchar(max) = 'AVM',
    @ItemNumber varchar(max) out,
    @Title varchar(max) out,
    @SubTitle varchar(max) out,
    @ShortDescription varchar(max) out,
    @LongDescription varchar(max) out,
    @ShortImageUrl varchar(max) out,
    @MedImageUrl varchar(max) out,
    @LgImageUrl varchar(max) out,
    @GroupCode varchar(max) out,
    @StartDate varchar(max) out
)
AS
    select 
    @GroupingCode = prdtemp.groupingcode,
    @ItemNumber = prd.itemnumber,    
    @Title = t.brochuredesc,
    @SubTitle = prdtemp.SubTitle,
    @ShortDescription = prdtemp.shortdescription,
    @LongDescription = prdtemp.longdescription,
    @ShortImageUrl = prdtemp.SmallImagePath,
    @MedImageUrl  = prdtemp.MediumImagePath,
    @LgImageUrl = prdtemp.LargeImagePath,
    @GroupCode = prd.GroupCode,
    @StartDate = s.StartDate

    from pryor_producttemplate prdtemp
        inner join pryor_prdItmmst prd
        on prdtemp.groupingcode  = prd.groupcode
        inner join pryor_topics t
        on prd.itemnumber =  t.topiccode
        inner join Pryor_Schedule s
        on t.TopicCode = s.topiccode    

    where prdtemp.groupingcode=@GroupingCode and t.country = 'U.S.A'

My issue is @StartDate is a var char in the DB. How can I convert this to a proper date to render as D/M/YY?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T04:28:17+00:00Added an answer on May 29, 2026 at 4:28 am

    You use the convert function to convert the string to a datetime:

    @StartDate = convert(datetime, s.StartDate, 120)
    

    The third parameter specifies the date format. The value 120 for example specifies the human friendly ISO 8601 format. See the reference for CAST and CONVERT for all date formats supported.

    Naturally you also have to change the type of the variable:

    @StartDate datetime out
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

If I have this stored proc definition minus the body ALTER PROCEDURE sp_AlloctionReport(@where NVARCHAR(1000),
Hi i have the following stored proc in SQL Server 2005: ALTER PROCEDURE [dbo].[slot_sp_EngineerTimeslots_Group]
I have this stored procedure: CREATE OR REPLACE PROCEDURE LIQUIDACION_OBTENER ( p_Cuenta IN NUMBER,
Well I have this MySQL stored procedure that I wrote and if I run
I have a stored procedure and if the stored procedure does this: SELECT 0
I have this stored procdure CREATE PROC dob.p_foobar ( @foo bit = NULL, @Bar
I have a stored proc that produces a table like this: PeriodStart PeriodEnd TotalActive
I have a stored procedure when I am executing this query in SQL Server
I have this string stored in a variable: IN=bla@some.com;john@home.com Now I would like to
I have a table of items stored this way : A1 | B1 A1

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.