Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: working with time calculations...
Hello!
Trainee DBA <xxx_at_hotmail.com> ÓÏÏÂÝÉÌ × ÎÏ×ÏÓÔÑÈ
ÓÌÅÄÕÀÝÅÅ:HRe77.13237$a04.45753_at_newsfeeds.bigpond.com...
> I'm trying to build a simple time keeping application... I'm stuck on
basic
> calculations with time.
> I have created a table with 2 date fields, where i want to insert start
and
> stop times.
> Later I want to build a view that subtract one from the other and
calculate
> the time in hours and minutes.
>
> My attempt so far of:
>
> insert into timesheet
> values ('24-JUL-2001 05:57:00', '24-JUL-2001 09:5:00')
Try this:
values(to_date('24-JUL-2001 05:57:00','DD-MON-YYYY HH24:SS:MI'), to_date('24-JUL-2001 09:5:00','DD-MON-YYYY HH24:SS:MI'))
Best regards!
Yaroslav.
>
> Doesn't seem to work... I get the error:
>
> ERROR at line 2:
> ORA-01830: date format picture ends before converting entire input string
>
> The SQLA course covers arithmetic with dates, which I 'm happy enough
> with... but how do you enter a specific date + time into a date field?
>
> If anybody could offer some help or a better way of doing this Id really
> appreciate the help. Thanks
>
>
> Peet
>
>
Received on Tue Jul 24 2001 - 09:35:55 CDT
![]() |
![]() |