EM2301. Practical Class 2
EM2301. Practical Class 2
EM2301. Practical Class 2
Requirement:
1. Determine the month, year, day of the month, and day of the week for each date (type 1 =
Sunday, 2 = Monday…).
2. Express each date in serial format such as 08-Jan-2021.
Ex 2:
The below data table contains dates on which several machines were bought and sold.
1. Determine how many months and years each machine was kept.
2. Create “Real working days” of for each type of machines (assuming no holidays and that
Monday-Friday are the workdays).
3. Create “Retire date” for operators that always lists the next 30 workdays since Sold date
(assuming no holidays and that Monday-Friday are the workdays).
4. Format the table
Bought Sold Months kept Years kept Real Working days Retire date
4/27/12 8/22/13 =Yea
12/1/12 9/4/14
7/30/13 5/13/15
7/10/13 3/15/15
11/17/19 7/22/22
1/2/20 7/3/23
1/18/17 2/3/21
10/6/18 1/7/22
9/10/17 9/23/19
4/11/16 2/10/20
11/7/22 10/8/23
1/14/14 12/21/16
11/19/13 7/16/16
8/26/20 5/9/24
12/30/15 11/7/16
12/25/22 1/8/27
6/29/16 8/17/19
9/7/14 10/31/16
2/18/11 12/26/11
8/11/18 8/17/21
4/4/22 7/14/24
Ex 3:
Given the call data as follow
Requirement:
1) Fill the Date series by month increasing.
2) Calculate the hours, minutes, and seconds of each call
3) Convert to the number of minutes to calculate fee, format with a hundred separator.
4) UNIT PRICE: unit price based on PROVINCE
Province Unit price (VND/min)
AGG 1100
BDG 1000
DTP 1100
HNI 3250
5) Format table.
Ex 4:
Given data as follow:
SCORE
Regional
ID NAME
Code CN1 CN2 CN3 TOTAL
5. Format table
Ex 5:
Given data in Table Car tenant:
Requirement:
1) Calculate Rent Day = Return Date – Rent Date
2) Convert Rent Day to number of weeks and days
Example: If Rent Day is 10 days then we convert to 1 week and 3 days.
3) Calculate Fee, given:
Fee = Week x Week Unit price + Day x Day Unit price
WEEK 3,200,000
Renting Unit price
DAY 500,000
And each customer gets a 5% discount if renting more than 1 week. (equal and greater than 1
week).
4) Calculate Total for column Rent Day, Week, Day and Fee
5) Format table