I have the below stored procedure to which I want to add a date variable (@LAST_DTE) with a format of 'mm/dd/yy'. These @variables are user prompts and I want the user to enter the date in this format.
What is the proper way to format this declared @variable? Thank you.
USE [TmsEPly]
GO
/****** Object: StoredProcedure [dbo].[TEST2_CUST_LOI_BASIC] Script Date: 7/26/2017 8:32:22 AM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[TEST2_CUST_LOI_BASIC]
@YR_CDE CHAR(4) = NULL,
@TRM_CDE CHAR(2) = NULL,
@LAST_DTE <<<<<<<<<< need formatting for user prompting
AS
if @YR_CDE is not NULL and @TRM_CDE is not null ad @LAST_DTE is not null
SELECT
SPU.id_num,
NM.last_name,
NM.first_name,
etc.,
What is the proper way to format this declared @variable? Thank you.
USE [TmsEPly]
GO
/****** Object: StoredProcedure [dbo].[TEST2_CUST_LOI_BASIC] Script Date: 7/26/2017 8:32:22 AM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[TEST2_CUST_LOI_BASIC]
@YR_CDE CHAR(4) = NULL,
@TRM_CDE CHAR(2) = NULL,
@LAST_DTE <<<<<<<<<< need formatting for user prompting
AS
if @YR_CDE is not NULL and @TRM_CDE is not null ad @LAST_DTE is not null
SELECT
SPU.id_num,
NM.last_name,
NM.first_name,
etc.,