Date Conversion

A

Abdul

Hello,

Do any have a finction which will enable to convert date from Gregorian
to Hijri and Vise Versa?

Thanks
 
N

NickHK

Abdul,
Something like this. I don't know what kind of formatting you would use for
the Hijri dates, but you get the idea.

Private Sub CommandButton1_Click()
Dim Cal As Long
Dim DateConv As Date

Cal = Calendar
DateConv = Now()

Calendar = vbCalGreg
Debug.Print Format(DateConv, "dd dddd/mmmm/yyyy")

Calendar = vbCalHijri
Debug.Print Format(DateConv, "dd dddd/mmmm/yyyy")

Calendar = Cal

End Sub

NickHK
 
A

Abdul

Thanks Nick,

How I can convert his to a function, so that i can use that as a
formula in sheet?

thanks again
 
A

Abdul

Thanks Nick,

How I can convert this to a function, so that i can use that as a
formula in sheet?

thanks again
 
A

Abdul

Thanks Nick,

How I can convert this to a function, so that i can use that as a
formula in sheet?

thanks again
 
N

NickHK

Abdul,
I never had a reason to use this, so I not sure.
But check out Excel's help on "Calendar" and see how to specify the date
format on a worksheet.
You need a version that support this.

NickHK
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top