Okay thanks, this is how I ended up doing it:
TO_DATE(SUBSTR(TO_CHAR(rec_num,999),1,6),'0YMMDD') AS Date
Another question though...
I have a field that is of type numeric so when I want to divide it like this:
SUM(vc_elapsed_time)/60.0
postgre complains "Unable to identify an operator '/'
In our postgre database is a decimal field with format YYMMDDhhmmss.99
where the 9s are random digits. I'm trying to strip off just the
YYMMDD and put it in date form.
So far I came up with:
SUBSTR(TO_CHAR(rec_num,999),1,6) AS Date which returns YMMDD.
For example where the rec_num
In our postgre database is a decimal field with format YYMMDDhhmmss.99
where the 9s are random digits. I'm trying to strip off just the
YYMMDD and put it in date form.
So far I came up with:
SUBSTR(TO_CHAR(rec_num,999),1,6) AS Date which returns YMMDD.
For example where the rec_n
On Wednesday 17 Sep 2003 13:50 in
<[EMAIL PROTECTED]>, wireless
([EMAIL PROTECTED]) wrote:
> For example where the rec_num is 30608124143.47069519725 the above
> functions return 30608.
Unless you are logging dates around 3 A.D., I suggest you add 2000 to the
number before you apply the TO_CHAR()