code_junkie

How do I trim date in PLSQL?

Nov 13th, 2011
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. select db||sysdate
  2. (this is the component where I want only 08 from the date)
  3. from gct;
  4.  
  5. to_char(sysdate, 'YY')
  6.  
  7. extract(YEAR FROM DATE '2008-12-24')
  8.  
  9. mod(extract(YEAR FROM DATE '2008-12-24'), 100)
  10.  
  11. select db||to_char(sysdate,'YY')
  12. from gct;
Add Comment
Please, Sign In to add comment