How to change Windows date from Gregorian date to Umm Al-Qura date Via batch file how that??
Moderator: DosItHelp
How to change Windows date from Gregorian date to Umm Al-Qura date Via batch file how that??
hi
How to change Windows date from Gregorian date to Umm Al-Qura date
Via batch file how that??
How to change Windows date from Gregorian date to Umm Al-Qura date
Via batch file how that??
Re: How to change Windows date from Gregorian date to Umm Al-Qura date Via batch file how that??
Hi, welcome to this forum. This is an advice for you:
- In first place, be patient. The people in this forum are not here to review new posts and reply they ASAP. Give some hours, or even days, for a reply.
- If you are new to this forum you should wait until a moderator approve your first post.
- You should give enough info to help others to help you. Many of us don't know what Umm al-Qura Calendar is, so you should give info links to such a topic. If you want to implement a conversion method in a Batch file, what are the rules for such a conversion?
- You should be very precise in your requests. For example, in what dates range you want the conversion? From 1392 AH to 1419 AH? After 15 March 2002 of Julian Calendar? I strongly suggest you to read the first topic on this forum before post any new question/reply here.
Antonio
- In first place, be patient. The people in this forum are not here to review new posts and reply they ASAP. Give some hours, or even days, for a reply.
- If you are new to this forum you should wait until a moderator approve your first post.
- You should give enough info to help others to help you. Many of us don't know what Umm al-Qura Calendar is, so you should give info links to such a topic. If you want to implement a conversion method in a Batch file, what are the rules for such a conversion?
- You should be very precise in your requests. For example, in what dates range you want the conversion? From 1392 AH to 1419 AH? After 15 March 2002 of Julian Calendar? I strongly suggest you to read the first topic on this forum before post any new question/reply here.
Antonio
Re: How to change Windows date from Gregorian date to Umm Al-Qura date Via batch file how that??
hi
Thank you for the advice
Thank you for the advice
Re: How to change Windows date from Gregorian date to Umm Al-Qura date Via batch file how that??
.NET implements the "UmAlQuraCalendar" class which can be used in a little PowerShell hybrid.
Batch code:
Steffen
Batch code:
Code: Select all
@echo off &setlocal
:: Year, Month, and Day in the Gregorian Calendar
set /a "gregY=2021, gregM=10, gregD=25"
:: Use the .NET "UmAlQuraCalendar" class in a PowerShell command to convert the date
for /f "tokens=1-3" %%i in (
'powershell.exe -nop -ep Bypass -c "$DT=New-Object DateTime(%gregY%,%gregM%,%gregD%);$UAQ=New-Object Globalization.UmAlQuraCalendar;(''+$UAQ.GetYear($DT)+' '+$UAQ.GetMonth($DT)+' '+$UAQ.GetDayOfMonth($DT))"'
) do set /a "uaqY=%%i, uaqM=%%j, uaqD=%%k"
:: Year, Month, and Day in the Umm Al-Qura Calendar
echo Year %uaqY%
echo Month %uaqM%
echo Day %uaqD%
pause
Re: How to change Windows date from Gregorian date to Umm Al-Qura date Via batch file how that??
Thank you, but the question was, how do I change the Windows date from the Gregorian date to the date of Umm Al-Qura through a batch file, how is that??
Re: How to change Windows date from Gregorian date to Umm Al-Qura date Via batch file how that??
Could you rephrase your question please? You just repeated your origininal question, but I still don't understand what you are looking for. Sorry.
Steffen
Steffen
Re: How to change Windows date from Gregorian date to Umm Al-Qura date Via batch file how that??
hi
oh gentlemen
The question is, how do I change the Windows date from the Gregorian date to the Umm Al-Qura date through a batch file code, how is that??
oh gentlemen
The question is, how do I change the Windows date from the Gregorian date to the Umm Al-Qura date through a batch file code, how is that??
Re: How to change Windows date from Gregorian date to Umm Al-Qura date Via batch file how that??
Are you looking to change the date on the Windows operating system, use a method to convert a date or something else? Unless you can re-phrase the question, the people on this forum will have a hard time assisting you. Is there any code you have tried or resources you have checked?
Re: How to change Windows date from Gregorian date to Umm Al-Qura date Via batch file how that??
You are literally just repeating yourself over and over with no new additional information to clarify your question. You were given code two days ago that does what you ask for. If that code is not working or is not what you expected then please explain how it does not work for you. I did verify the code that was posted by user aGerman. If you cannot provide any additional feedback I will just close your question and you can move onto some other computer forum to ask your question.