Skip to content
David Kittell
David Kittell

Application & System: Development / Integration / Orchestration

  • Services
    • Application Development
    • Online Application Integration
  • Code
  • Online Tools
  • Tech Support
David Kittell

Application & System: Development / Integration / Orchestration

Gregorian Date to Hijri Date

Posted on December 3, 2013October 26, 2015 By David Kittell

Recently I was asked to help convert Gregorian Date to Hijri Date and vice versa.

One thing to note is that with Hijri date format you must keep it as a string.

SELECT CONVERT(varchar(30), GETDATE(), 131)
-- Returns: 30/01/1435  8:33:10:030AM
SELECT CONVERT(datetime, '30/01/1435  8:32:19:467AM', 131)
-- Returns: 2013-12-03 08:32:19.467
Originally Posted on December 3, 2013
Last Updated on October 26, 2015
All information on this site is shared with the intention to help. Before any source code or program is ran on a production (non-development) system it is suggested you test it and fully understand what it is doing not just what it appears it is doing. I accept no responsibility for any damage you may do with this code.

Related

Code MSSQL SQL

Post navigation

Previous post
Next post

Related Posts

Clear Form Field Inputs

Posted on June 10, 2014October 26, 2015

ClearInputs(Page.Controls); private void ClearInputs(ControlCollection ctrls) { foreach (Control ctrl in ctrls) { if (ctrl is TextBox) ((TextBox)ctrl).Text = string.Empty; else if (ctrl is DropDownList) ((DropDownList)ctrl).ClearSelection(); ClearInputs(ctrl.Controls); } } Reference: http://stackoverflow.com/questions/4872364/clearing-all-fields-in-an-asp-net-form Originally Posted on June 10, 2014Last Updated on October 26, 2015 All information on this site is shared with the…

Read More

Restrict Access to Internal IP

Posted on September 26, 2013October 26, 2015

Many times we have sites that are public but have pages that should only be viewed by internal users. Ideally the settings would be configured on the server level in IIS but if not possible for some reason this may help. One key thing to note is this code will…

Read More

MySQL Get Disk Space Allocation of Database

Posted on October 2, 2015

SELECT table_name AS "Tables" ,round(((data_length + index_length) / 1024 / 1024), 2) "Size in MB" FROM information_schema.TABLES ORDER BY (data_length + index_length) DESC SELECT table_name AS "Tables" ,round(((data_length + index_length) / 1024 / 1024), 2) "Size in MB" FROM information_schema.TABLES WHERE table_schema = "$DBNAME" ORDER BY (data_length + index_length) DESC…

Read More

Code

Top Posts & Pages

  • PowerShell - Rename Pictures to Image Taken
  • Front Page
  • C# - Start/Stop/Restart Services
  • MacPorts / HomeBrew - Rip CD tracks from terminal
  • PowerShell - Show File Extensions

Recent Posts

  • Javascript – Digital Clock with Style
  • BASH – Web Ping Log
  • BASH – Picture / Video File Name Manipulation
  • Mac OSX Terminal – Create SSH Key
  • Bash – Rename Picture

Top Posts

  • PowerShell - Rename Pictures to Image Taken
  • C# - Start/Stop/Restart Services
  • MacPorts / HomeBrew - Rip CD tracks from terminal
  • PowerShell - Show File Extensions
  • Open On Screen Keyboard (OSK)
  • SQLite - Auto-Increment / Auto Generate GUID
©2025 David Kittell | WordPress Theme by SuperbThemes