sql - Update birthdate incase the date is Hijri by the value of converting hijri birthdate to Gregorian -


table contains many records hijri date value , gregorian value in birthdate column, please how update birthdate value of converting hijri date gregorian tried script dosen't work - meant no changes - although

(18422 row(s) affected)

update member set birthdate = case when (substring(cast(birthdate nvarchar), 1, 2) ='14')  or  (substring(cast(birthdate nvarchar), 1, 2) ='13')  (select convert(date, birthdate , 131) )  else  birthdate  end 

try below code convert birthdate column records hijri format:

update member set birthdate = convert(varchar(100),birthdate,131) --- [hijri date gregorian date]

update member set birthdate = convert(datetime, birthdate, 131) --- [ gregorian date hijri date]

there several blogs this, likethis one: http://blogs.msdn.com/b/wael/archive/2007/04/29/sql-server-hijri-hijra-dates.aspx


Comments

Popular posts from this blog

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

html - Outlook 2010 Anchor (url/address/link) -

android - How to create dynamically Fragment pager adapter -