I have two store procedure that in one of them I want to get one field form my view that has a Date value.
In another StoreProcedure I want to convert the output value of first SP to Hijri Shamsi Date:
this is my first SP that get the date field:
Alter PROCEDURE GetExamDate @Id int AS select ExamTime from View_SubjectStudyCourse where @Id=CourseId Go
and then I want to use the below code in the second procedure to converts the Gregorian date to Hijri date is:
DECLARE @DateTime AS DATETIME SET @DateTime=GETDATE() SELECT @DateTime AS [Gregorian Date] , CONVERT(VARCHAR(11),@DateTime,131) AS [Gregorian date to Hijri date] GOand now I don't know how to use the above code in second SP and how can I return value of the <g class="gr_ gr_24 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del multiReplace" data-gr-id="24" id="24">GetExamDate</g> Procedure in the second procedure?!