Forum Replies Created

Viewing 2 posts - 1,921 through 1,922 (of 1,922 total)

  • RE: How to Split the Text

    Here is other way of doing it

    DECLARE @WORD VARCHAR(50)

    SET @WORD = 'FA885A0/FA094V0'

    SELECT SUBSTRING(@WORD,1,CHARINDEX('/',@WORD)-1) FirstPartofString, SUBSTRING(@WORD,CHARINDEX('/',@WORD)+1,LEN(@WORD)) SecondPartofString

  • RE: Get date format as DD-MON-YYYY HH:MM AM

    Lynn Pettis (11/11/2009)


    Does this code help you?

    declare @MyDate datetime;

    set @MyDate = getdate();

    select convert(varchar(30), @MyDate, 113);

    select case when datepart(hh, @MyDate) > 12 then replace(convert(varchar(30), @MyDate, 113), cast(datepart(hh, @MyDate) as varchar), cast((datepart(hh,...

Viewing 2 posts - 1,921 through 1,922 (of 1,922 total)