I want to convert the date into google sheet
Looks like https://youtu.be/tbGZudBLNAk might have a solution for this? Maybe?
Hope this helps, at least a little,
Ian
Get API Key from Aladhan:
Enable Google Apps Script:
function CONVERT_TO_HIJRI(date) {
var apiKey = 'YOUR_ALADHAN_API_KEY';
var apiUrl = 'https://api.aladhan.com/v1/gToH?';
var formattedDate = Utilities.formatDate(date, 'GMT', 'yyyy-MM-dd');
var response = UrlFetchApp.fetch(apiUrl + 'date=' + formattedDate, {
headers: {
'X-API-Key': apiKey
},
});
var data = JSON.parse(response.getContentText());
if (data.status === 'OK') {
return data.data.hijri.date;
} else {
return 'Error converting date';
}
}
Save the script:
Use the function in your sheet:
User | Count |
---|---|
4 | |
2 | |
1 | |
1 | |
1 |