|
-
Nov 5th, 2002, 02:29 AM
#1
Thread Starter
New Member
How to Convert a Gregorian date to Hijri format
first of all in vb Access i can convert the date formate as i want . but in .NET
How to Convert a Gregorian date to Hijri format
thanks for all
-
Nov 5th, 2002, 04:47 AM
#2
Frenzied Member
In Access 2002, there is an option to use Hijri Calendar, you can find it in tools, options, international.
-
Nov 5th, 2002, 09:05 AM
#3
Frenzied Member
First:
I am sorry for previous response, I thought you said you CANT use Hijri calendar in access
Then:
use the following code to change from georgian date to Hijri
Code:
Dim hj As New CultureInfo("ar-SA")
Dim hjyr, hjmo, hjday As Integer, gdate As DateTime
gdate = #11/11/2002# 'or any other date
hj.DateTimeFormat.Calendar = New HijriCalendar()
hjyr = hj.DateTimeFormat.Calendar.GetYear(gdate)
hjmo = hj.DateTimeFormat.Calendar.GetMonth(gdate)
hjday = hj.DateTimeFormat.Calendar.GetDayOfMonth(gdate)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|