You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To run your app, right-click the **Data_M1** project in the Solution Explorer, select **Debug**, and then select **Start New Instance**.
77
90
78
91
> **TIP**: If you encounter any issues while completing this exercise, review the provided code snippets and compare them to your own code. Pay close attention to the syntax and structure of the code. If you're still having trouble, you can review the solution code in the sample apps that you downloaded at the beginning of this exercise. To view the Data_M1 solution, navigate to the LP4SampleApps/Data_M1/Solution folder and open the Solution project in Visual Studio Code.
@@ -81,108 +94,128 @@ Use the following steps to complete this section of the exercise:
81
94
82
95
In this task, you will use the `DateTime`, `DateOnly`, `TimeOnly`, and `TimeZoneInfo` classes to create and manipulate date and time values.
83
96
84
-
### Task 1 Steps
97
+
1. Ensure that you have the Program.cs file open in Visual Studio Code.
98
+
99
+
1. Locate the following code comment:
100
+
101
+
```csharp
102
+
// TASK 1: Step 1 - Get the current date and time, and extract date and time components
103
+
```
85
104
86
-
1.**Get the current date and time**
87
-
Add the following code to retrieve and display the current date and time:
105
+
1. To get and display the current date and time, add the following code below the comment:
88
106
89
107
```csharp
90
108
DateTime currentDateTime = DateTime.Now;
91
109
Console.WriteLine($"Current Date and Time: {currentDateTime}");
92
110
```
93
111
94
-
1.**Get the current date only**
95
-
Add the following code to retrieve and display the current date:
112
+
1. Locate the following code comment:
113
+
114
+
```csharp
115
+
// TASK 1: Step 2 - Get the current day of the week and the current month and year
0 commit comments