You are on page 1of 3

Assignment

1. Give Syntax and Queries to demonstrate the use of following Date functions in System
Defined Table
a. Add_months(d,n)
b. Last_day(d)
c. Months between(d2,d1)
d. Next_day(d,day)
2. Create table task___ and perform the following operations
Task_name
Start_date
End_Date
Planning
01-april-1995
23-april-1995
Analysis
24-april-1995
14-may-1995
Design
15-may-1995
30-may-1995
Coding
01-june-1995
30-june-1995
Testing
01-july-1995
02-aug-1995
a. Increase End date by 3 months and name the column as new end date
b. Find the last working day of every end date
c. Calculate months between start date and end date.
d. Find the next working day of every start date.
3. Give Syntax and Queries to demonstrate the use of following Date functions in System
Defined Table
a. To_Char()
b. To_Date()

c. To_number

4.
4. Create table employee with fields: Empid,DOB(char), doj, salary,deptname
a. Format DOJ to yyyy/mm/dd
b. Format DOJ to Month dd,yyyy
c. Use FM to do the above tasks again
d. Format salary column to $
e. Format salary column to $999.99
f. Convert dob to date format
g. Convert dob to number format
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.

38.
39.
40.
41.
42.
43.
44.
45.
46.
47.
48.
49.
50.
51.
52.
53.
54.
55.
56.
57.
58.

You might also like