• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

problme with sql queries

 
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

I have one query

___________________________________________________________________________
SELECT TO_CHAR(TO_DATE('05/14/2008 11:20:25PM', 'MM/DD/YYYY HH12MISS'), 'YYYY/MM') FROM myDB;

___________________________________________________________________________

i have time stamp in database in format like '05/14/2008 11:20:25PM'.
i want it to convert into format like YYYY/MM.However i have tried the aboce query but could not get the desired result.

I am using PLSQL devloper as a editor and my databae is in oracle.

Does anybuddy have anyidea. how to do.
 
Ranch Hand
Posts: 387
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,

just add a few ":", like



Herman
 
Let nothing stop you! Not even this tiny ad:
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
reply
    Bookmark Topic Watch Topic
  • New Topic