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

Oracle Clean Date Format

Posted on September 18, 2013October 26, 2015 By David Kittell

Sometimes you have to pull a date from Oracle in a cleaner format, this is one way to achieve the format you want.

// Convert the Oracle date 19000101 to 01-01-1900
public string OracleCleanDate(string strDate)
	{
		if (strDate.Length == 8)
		{

			string strYear, strMonth, strDay;

			strYear = strDate.Substring(0, 4);
			strMonth = strDate.Substring(4, 2);
			strDay = strDate.Substring(6, 2);

			strDate = strMonth + "-" + strDay + "-" + strYear;
		}
		return strDate;
	}
Originally Posted on September 18, 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 CSharp

Post navigation

Previous post
Next post

Related Posts

UNIX – Remove Apache, MySQL & PHP

Posted on October 30, 2015October 30, 2015

WARNING – THIS WILL REMOVE WITHOUT PROMPT dpkg -l *apache* *php* *mysql* phpmyadmin | grep ^ii | awk ‘{ print $2}’ | xargs sudo apt-get -y purge –auto-remove rm -r /etc/apache2 rm -r /etc/php5 rm -r /etc/mysql sudo apt-get –assume-yes purge apache* php* mysql* phpmyadmin sudo apt-get –assume-yes autoremove sudo…

Read More

Ektron – DMS Content List

Posted on October 31, 2014October 26, 2015

<%@ Page Title="" Language="C#" CodeFile="DMSFileList.aspx.cs" Inherits="DMSFileList" %> <!DOCTYPE html> <html lang="en" xmlns="http://www.w3.org/1999/xhtml"> <head id="Head1" runat="server"> <meta charset="utf-8" /> <title>DMS File List</title> </head> <body> <form id="form1" runat="server"> <asp:Repeater ID="subContentRepeater" runat="server"> <HeaderTemplate> <table style="border: 1px solid #000000;"> <tr> <th>ID</th> <th>Type</th> <th>QuickLink</th> <th>Title</th> <th>Summary</th> </tr> </HeaderTemplate> <ItemTemplate> <tr> <td style="vertical-align: text-top;"> <%# DataBinder.Eval(Container.DataItem,…

Read More

Red Hat – Check Subscription / Register Server

Posted on February 21, 2017February 25, 2021

Check subscription manager status sudo -s # If in Docker not needed if [ "$(subscription-manager status| grep "Overall Status")" != "Overall Status: Unknown" ]; then clear echo "Properly Registered" else echo -e "Needs Registered\n\nPlease get with your server team to register this server" $SHELL fi sudo -s # If in…

Read More

Code

Top Posts & Pages

  • PowerShell - Rename Pictures to Image Taken
  • Front Page
  • PowerShell - IIS Remove Site
  • SQLite - Auto-Increment / Auto Generate GUID
  • PowerShell - FTP Upload Directory With Sub-Directories

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
  • PowerShell - IIS Remove Site
  • SQLite - Auto-Increment / Auto Generate GUID
  • PowerShell - FTP Upload Directory With Sub-Directories
  • Raspberry Pi - Remove Default Apps
  • PowerShell - Change Windows CD/DVD Drive Letter
©2025 David Kittell | WordPress Theme by SuperbThemes