English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

iam having a date like '1428/01/17'(date is in Hijri Calendar)(format is "yyyy/mm/dd")
I Have to convert it into Gregorian date which is '2007/02/04(format is yyyy/mm/dd).
any body know how to do this,
please help me

2007-02-03 19:27:02 · 2 answers · asked by visagan s 1 in Computers & Internet Programming & Design

2 answers

I used this to convert from Gregorian to Hijri (must output as a string to preserve Hijri formatting):

CONVERT(varchar(30), GETDATE(), 131)

Obviously you can substitute GETDATE() for any native datetime or smalldatetime value.

To convert from a Hijri-formatted datetime string into a native datetime value:

CONVERT(datetime, '17/01/1428 4:22:24:073AM', 131)

Just insert the Hijri data into the second parameter as a string.

2007-02-03 20:34:01 · answer #1 · answered by Rex M 6 · 0 0

14/04/1445

2015-04-26 07:38:48 · answer #2 · answered by MOHAMMED A 1 · 0 0

fedest.com, questions and answers