Forum Stats

  • 3,733,828 Users
  • 2,246,828 Discussions
  • 7,856,887 Comments

Discussions

PL/SQL 101 : DataTypes - DATE

BluShadow
BluShadow Member, Moderator Posts: 40,986 Red Diamond
edited January 2016 in SQL & PL/SQL

A long awaited instalment of my PL/SQL 101 series, following on from the NUMBER datatype...

The topic for today is.... the DATE datatype...

Enjoy

[ Edited 08 Jan 2016 08:45 GMT+0 : Updated link to date functions on page 22 ]

Comments

  • Oracle_Monkey
    Oracle_Monkey Member Posts: 328 Blue Ribbon

    Nice to put the information in the PDF .

  • Jagadekara
    Jagadekara Member Posts: 1,859
    edited December 2015
  • Thanks for that, i have read the pdf until now and i'm learning interesting things.

    Well made pdf, by the way.

    Great work.

  • Amatu Allah Neveen Ebrahim
    Amatu Allah Neveen Ebrahim Member Posts: 5,081 Gold Trophy

    Thanks, pls keep it up with more advanced cases.

  • BluShadow
    BluShadow Member, Moderator Posts: 40,986 Red Diamond

    Thanks, pls keep it up with more advanced cases.

    Any suggestions in particular?

  • Amatu Allah Neveen Ebrahim
    Amatu Allah Neveen Ebrahim Member Posts: 5,081 Gold Trophy

    Any suggestions in particular?

    Yes, Date is really a Great Oracle datatype has date, time and time status (AM,PM).

    Date counts in our Work Attendance (IN/OUT) working hours, exclude Holidays out of working hours, influence the employees excuses Many advanced date usage are required in approximately in a daily basis. Even the Overtime or the Delay has an increment or decrements in workers or employees working hours during the day,etc.

    Lovely & Powerful essay u can conquer.

    Amatu Allah.

    Chizzle PackMOHAMMED IBRAHIM
  • Chizzle Pack
    Chizzle Pack Member Posts: 22

    Thank you, excellent.

  • Frank Kulash
    Frank Kulash Member, Moderator Posts: 40,493 Red Diamond

    I especially like what it says at the top of page 14:

    ... we've seen some really ingenious (read that as "bad") code ...
    
    BluShadow
  • ranit B
    ranit B Member Posts: 3,268 Silver Trophy
    edited January 2016

    Hey Blu,

    It is indeed very useful, and put up in a very concise manner. Thanks a lot!

    Just one thing - from page 22 -

    If you’re not familiar with the DateTime functions within Oracle, take some time to read through each of them and have a practice to really get a feel for what you can do. They’re all nicely documented:
    https://docs.oracle.com/cd/B19306_01/server.102/b14200/functions001.htm#i88891
    
    

    Why is the documentation link of v10.2 ? Atleast v11.2 ? Any reason in particuar... Just curious!

  • BluShadow
    BluShadow Member, Moderator Posts: 40,986 Red Diamond

    Hey Blu,

    It is indeed very useful, and put up in a very concise manner. Thanks a lot!

    Just one thing - from page 22 -

    If you’re not familiar with the DateTime functions within Oracle, take some time to read through each of them and have a practice to really get a feel for what you can do. They’re all nicely documented:
    https://docs.oracle.com/cd/B19306_01/server.102/b14200/functions001.htm#i88891
    
    

    Why is the documentation link of v10.2 ? Atleast v11.2 ? Any reason in particuar... Just curious!

    First link found when searching.  I'll update it when I have a moment.

  • BluShadow
    BluShadow Member, Moderator Posts: 40,986 Red Diamond

    Hey Blu,

    It is indeed very useful, and put up in a very concise manner. Thanks a lot!

    Just one thing - from page 22 -

    If you’re not familiar with the DateTime functions within Oracle, take some time to read through each of them and have a practice to really get a feel for what you can do. They’re all nicely documented:
    https://docs.oracle.com/cd/B19306_01/server.102/b14200/functions001.htm#i88891
    
    

    Why is the documentation link of v10.2 ? Atleast v11.2 ? Any reason in particuar... Just curious!

    I've now updated the link to the 12c documentation.

  • Chris Hunt
    Chris Hunt Member Posts: 2,066 Gold Trophy

    Great stuff, Blushadow. Let's hope that the people that need to read this document DO read it.

    The only thing I think it's missing is some discussion of the TIMESTAMP type. You mention it in passing a couple of times, but perhaps you could add a section talking about TIMESTAMPs and when/why you might use them in preference to DATEs.

  • BluShadow
    BluShadow Member, Moderator Posts: 40,986 Red Diamond

    Great stuff, Blushadow. Let's hope that the people that need to read this document DO read it.

    The only thing I think it's missing is some discussion of the TIMESTAMP type. You mention it in passing a couple of times, but perhaps you could add a section talking about TIMESTAMPs and when/why you might use them in preference to DATEs.

    mainly due to time restraints and the fact I didn't want to overface people with too much additional detail.  I think it gets over the concept that the correct datatypes should be used.  Once people realise that, then they can read the documentation for the relevant datatype.

    Of course, if you want to draft an additional section on what you suggest I'll be happy to add it in.

  • Mohammed Sardar
    Mohammed Sardar Member Posts: 190

    Hi BluShadow

    Your document was very useful. You have out lots of commitment and effort.
    Thanks a ton. Wishing you all the very best.

    Kind Regards

    Mohammed Sardar

  • Kalpataru
    Kalpataru Member Posts: 4,615 Bronze Crown

    Thanks Blu

       Excellent article by you and well explained by you. I have learned a lot from this article and read about your hard work at the time of "y2k" problem.

      

    Some of the question i have

    -------------------------------------------

    1) What was the Y2K problem ? Please describe in details.

    2) What is written inside bypass_date_validation ?

  • BluShadow
    BluShadow Member, Moderator Posts: 40,986 Red Diamond

    Thanks Blu

       Excellent article by you and well explained by you. I have learned a lot from this article and read about your hard work at the time of "y2k" problem.

      

    Some of the question i have

    -------------------------------------------

    1) What was the Y2K problem ? Please describe in details.

    2) What is written inside bypass_date_validation ?

    1) Google is your friend: https://en.wikipedia.org/wiki/Year_2000_problem

    2) It's a function that turns raw data into a DATE datatype and returns that value.  You don't need to know the details (though you can find them on the web if you google)

  • EdStevens
    EdStevens Member Posts: 28,137 Gold Crown

    "1) What was the Y2K problem ? Please describe in details."


    As one of the legions of programmers who busted their a** for two years to prevent an Apocalypse on 1 Jan 2000, I find this question coming from a member of the IT profession to be truly frightening.  I understand that it has been 16+ years and over half of the IT community was in early adolescence (or earlier) at the time, but it is still disturbing at how fast we lose 'institutional memory'.  And we see the results of that almost daily on these very forums.

    BluShadow
  • Rahul Motaparthi
    Rahul Motaparthi Member Posts: 85

    "1) What was the Y2K problem ? Please describe in details."


    As one of the legions of programmers who busted their a** for two years to prevent an Apocalypse on 1 Jan 2000, I find this question coming from a member of the IT profession to be truly frightening.  I understand that it has been 16+ years and over half of the IT community was in early adolescence (or earlier) at the time, but it is still disturbing at how fast we lose 'institutional memory'.  And we see the results of that almost daily on these very forums.

    I was 8 years old then. The most disturbing thing, if i recall now is the 2oo0 glasses that everyone wore.

    Chizzle Pack
  • BluShadow
    BluShadow Member, Moderator Posts: 40,986 Red Diamond

    I was 8 years old then. The most disturbing thing, if i recall now is the 2oo0 glasses that everyone wore.

    That was the new years celebrations, not the Y2K bug.  We didn't wear any special glasses to fix the bugs.

    Oracle_Monkey
Sign In or Register to comment.