Reputation: 227
Does anyone know if it is possible to take the date from a random date in pl sql.
example.
SELECT SYSDATE FROM DUAL
and here the output would be say : 26-10-2010 13:30:34
Now I want to have just the date as a number. In this case that would be 26.
Or is there some sort of function like IsNum that can recognize it for me. So I can just take 26 and leave the rest out.
Upvotes: 3
Views: 3478
Reputation: 11
select count(*) from
(select sysdate+rownum dates from dual connect by rownum < (sysdate+15)-(sysdate))
where to_char(dates,'D') <> '1' and to_char(dates,'D') <> '7'
Upvotes: 1
Reputation: 1646
All format models are described in the official SQL Reference, take a look in case you need something else
Upvotes: 3
Reputation: 10015
You can use
to_char(SYSDATE, 'DD')
More you can read here: LINK
Upvotes: 4