{"id":71669,"date":"2024-07-31T23:21:40","date_gmt":"2024-07-31T19:51:40","guid":{"rendered":"https:\/\/nabfollower.com\/blog\/c-da-datatime-bilan-ishlash-440n\/"},"modified":"2024-07-31T23:21:40","modified_gmt":"2024-07-31T19:51:40","slug":"c-da-datatime-bilan-ishlash-440n","status":"publish","type":"post","link":"https:\/\/nabfollower.com\/blog\/c-da-datatime-bilan-ishlash-440n\/","title":{"rendered":"\u06a9\u0627\u0631 \u0628\u0627 DataTime \u062f\u0631 \u0633\u06cc \u0634\u0627\u0631\u067e"},"content":{"rendered":"<p>Summarize this content to 400 words in Persian Lang<br \/>\n            Assalamu alaykum \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u0627\u0646 \u0639\u0632\u06cc\u0632 \u0646\u062d\u0648\u0647 \u06a9\u0627\u0631 \u0628\u0627 DateTime \u0631\u0648 \u06a9\u0627\u0645\u0644 \u0648 \u0642\u0627\u0628\u0644 \u0641\u0647\u0645 \u062a\u0648\u0636\u06cc\u062d \u0628\u062f\u0645.  \u0647\u0631 \u0645\u0631\u062d\u0644\u0647 \u0631\u0627 \u0628\u0627 \u0645\u062b\u0627\u0644 \u062a\u0648\u0636\u06cc\u062d \u062e\u0648\u0627\u0647\u0645 \u062f\u0627\u062f.<\/p>\n<p>\u0627\u06cc\u062c\u0627\u062f \u06cc\u06a9 \u0634\u06cc\u0621 DateTime\u06af\u0631\u0641\u062a\u0646 \u0632\u0645\u0627\u0646 \u062d\u0627\u0644DateTime.Now \u062a\u0627\u0631\u06cc\u062e \u0648 \u0632\u0645\u0627\u0646 \u0641\u0639\u0644\u06cc \u0631\u0627 \u0628\u0631\u0645\u06cc \u06af\u0631\u062f\u0627\u0646\u062f.<\/p>\n<p>DateTime now = DateTime.Now;<br \/>\nConsole.WriteLine(&#8220;Hozirgi vaqt: &#8221; + now);<\/p>\n<p>    \u0648\u0627\u0631\u062f \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u0634\u0648\u06cc\u062f<\/p>\n<p>    \u0627\u0632 \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u062e\u0627\u0631\u062c \u0634\u0648\u06cc\u062f<\/p>\n<p>Bu kod hozirgi kompyuter vaqti va sanasini ekranga chiqaradi.<\/p>\n<p>\u062a\u0627\u0631\u06cc\u062e \u0648 \u0632\u0645\u0627\u0646 \u062f\u0642\u06cc\u0642 \u0631\u0627 \u0627\u06cc\u062c\u0627\u062f \u06a9\u0646\u06cc\u062f\u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0633\u0627\u0632\u0646\u062f\u0647 DateTime\u060c \u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u062f \u062a\u0627\u0631\u06cc\u062e \u0648 \u0632\u0645\u0627\u0646 \u062f\u0642\u06cc\u0642\u06cc \u0631\u0627 \u062a\u0646\u0638\u06cc\u0645 \u06a9\u0646\u06cc\u062f.<\/p>\n<p>DateTime specificDate = new DateTime(2024, 7, 31, 14, 30, 0); \/\/ 2024 yil 31-iyul, 14:30:00<br \/>\nConsole.WriteLine(&#8220;Aniq sana va vaqt: &#8221; + specificDate);<\/p>\n<p>    \u0648\u0627\u0631\u062f \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u0634\u0648\u06cc\u062f<\/p>\n<p>    \u0627\u0632 \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u062e\u0627\u0631\u062c \u0634\u0648\u06cc\u062f<\/p>\n<p>Bu kod 2024 yil 31-iyul kuni soat 14:30:00 ni ifodalaydi.<\/p>\n<p>\u0641\u0642\u0637 \u062a\u0627\u0631\u06cc\u062e\u0641\u0642\u0637 \u0628\u0631\u0627\u06cc \u0627\u06cc\u062c\u0627\u062f \u062a\u0627\u0631\u06cc\u062e\u060c \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u06cc\u062f \u06cc\u06a9 \u0634\u06cc\u0621 DateTime \u0628\u062f\u0648\u0646 \u062f\u0631\u062c \u0628\u062e\u0634\u06cc \u0632\u0645\u0627\u0646 \u0627\u06cc\u062c\u0627\u062f \u06a9\u0646\u06cc\u062f.<\/p>\n<p>DateTime specificDateOnly = new DateTime(2024, 7, 31);<br \/>\nConsole.WriteLine(&#8220;Aniq sana: &#8221; + specificDateOnly.ToShortDateString());<\/p>\n<p>    \u0648\u0627\u0631\u062f \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u0634\u0648\u06cc\u062f<\/p>\n<p>    \u0627\u0632 \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u062e\u0627\u0631\u062c \u0634\u0648\u06cc\u062f<\/p>\n<p>Bu kod sanani 2024 yil 31-iyul qilib belgilaydi va vaqtni 00:00:00 qilib o&#8217;rnatadi.<\/p>\n<p>\u062f\u0631\u06cc\u0627\u0641\u062a \u0642\u0637\u0639\u0627\u062a \u0645\u062e\u062a\u0644\u0641 \u0627\u0632 \u06cc\u06a9 DateTime\u0633\u0627\u0644\u060c \u0645\u0627\u0647\u060c \u0631\u0648\u0632\u060c \u0633\u0627\u0639\u062a \u0648 \u0645\u0648\u0627\u0631\u062f \u062f\u06cc\u06af\u0631\u0628\u062e\u0634 \u0647\u0627\u06cc \u0633\u0627\u0644\u060c \u0645\u0627\u0647\u060c \u0631\u0648\u0632 \u0648 \u0632\u0645\u0627\u0646 \u0631\u0627 \u0645\u06cc \u062a\u0648\u0627\u0646 \u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0648\u06cc\u0698\u06af\u06cc \u0647\u0627\u06cc \u0645\u062e\u062a\u0644\u0641 \u0634\u06cc DateTime \u0627\u0633\u062a\u062e\u0631\u0627\u062c \u06a9\u0631\u062f.<\/p>\n<p>DateTime now = DateTime.Now;<br \/>\nConsole.WriteLine(&#8220;Yil: &#8221; + now.Year);<br \/>\nConsole.WriteLine(&#8220;Oy: &#8221; + now.Month);<br \/>\nConsole.WriteLine(&#8220;Kun: &#8221; + now.Day);<br \/>\nConsole.WriteLine(&#8220;Soat: &#8221; + now.Hour);<br \/>\nConsole.WriteLine(&#8220;Daqiqa: &#8221; + now.Minute);<br \/>\nConsole.WriteLine(&#8220;Soniy: &#8221; + now.Second);<\/p>\n<p>    \u0648\u0627\u0631\u062f \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u0634\u0648\u06cc\u062f<\/p>\n<p>    \u0627\u0632 \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u062e\u0627\u0631\u062c \u0634\u0648\u06cc\u062f<\/p>\n<p>Bu kod hozirgi yil, oy, kun, soat, daqiqa va soniyani ekranga chiqaradi.<\/p>\n<p>\u0645\u062d\u0627\u0633\u0628\u0647 \u062a\u0641\u0627\u0648\u062a \u0628\u06cc\u0646 \u062a\u0627\u0631\u06cc\u062e \u0647\u0627\u0634\u0645\u0627\u0631\u0634 \u062a\u0639\u062f\u0627\u062f \u0631\u0648\u0632\u0647\u0627\u0628\u0631\u0627\u06cc \u0645\u062d\u0627\u0633\u0628\u0647 \u062a\u0641\u0627\u0648\u062a \u0628\u06cc\u0646 \u062a\u0627\u0631\u06cc\u062e \u0647\u0627\u060c \u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u062f \u062a\u0641\u0627\u0648\u062a \u0628\u06cc\u0646 \u062f\u0648 \u0634\u06cc DateTime \u0631\u0627 \u0628\u062f\u0633\u062a \u0622\u0648\u0631\u06cc\u062f.<\/p>\n<p>DateTime startDate = new DateTime(2024, 1, 1);<br \/>\nDateTime endDate = new DateTime(2024, 7, 31);<br \/>\nTimeSpan difference = endDate &#8211; startDate;<br \/>\nConsole.WriteLine(&#8220;Kunlar soni: &#8221; + difference.Days);<\/p>\n<p>    \u0648\u0627\u0631\u062f \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u0634\u0648\u06cc\u062f<\/p>\n<p>    \u0627\u0632 \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u062e\u0627\u0631\u062c \u0634\u0648\u06cc\u062f<\/p>\n<p>Bu kod 2024 yil 1-yanvardan 2024 yil 31-iyulgacha bo&#8217;lgan kunlar sonini hisoblaydi.<\/p>\n<p>\u062a\u0641\u0627\u0648\u062a \u0632\u0645\u0627\u0646\u06cc\u0647\u0645\u0686\u0646\u06cc\u0646 \u0627\u0645\u06a9\u0627\u0646 \u062a\u0639\u06cc\u06cc\u0646 \u062a\u0641\u0627\u0648\u062a \u0632\u0645\u0627\u0646\u06cc \u0628\u06cc\u0646 \u062a\u0627\u0631\u06cc\u062e \u0647\u0627 \u0648\u062c\u0648\u062f \u062f\u0627\u0631\u062f.<\/p>\n<p>DateTime startTime = new DateTime(2024, 7, 31, 8, 0, 0); \/\/ 2024-07-31 08:00:00<br \/>\nDateTime endTime = new DateTime(2024, 7, 31, 17, 30, 0); \/\/ 2024-07-31 17:30:00<br \/>\nTimeSpan timeDifference = endTime &#8211; startTime;<br \/>\nConsole.WriteLine(&#8220;Soatlar soni: &#8221; + timeDifference.TotalHours);<br \/>\nConsole.WriteLine(&#8220;Daqiqalar soni: &#8221; + timeDifference.TotalMinutes);<\/p>\n<p>    \u0648\u0627\u0631\u062f \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u0634\u0648\u06cc\u062f<\/p>\n<p>    \u0627\u0632 \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u062e\u0627\u0631\u062c \u0634\u0648\u06cc\u062f<\/p>\n<p>Bu kod 2024 yil 31-iyul kuni soat 8:00 dan 17:30 gacha bo&#8217;lgan vaqt farqini hisoblaydi.<\/p>\n<p>\u0642\u0627\u0644\u0628 \u0628\u0646\u062f\u06cc \u062a\u0627\u0631\u06cc\u062e\u0641\u0631\u0645\u062a \u0647\u0627\u06cc \u0631\u0627\u06cc\u062c\u062a\u0627\u0631\u06cc\u062e \u0631\u0627 \u0645\u06cc \u062a\u0648\u0627\u0646 \u062f\u0631 \u0641\u0631\u0645\u062a \u0647\u0627\u06cc \u0645\u062e\u062a\u0644\u0641 \u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0631\u0648\u0634 ToString \u062e\u0631\u0648\u062c\u06cc \u062f\u0627\u062f.<\/p>\n<p>DateTime now = DateTime.Now;<br \/>\nConsole.WriteLine(&#8220;To&#8217;liq sana va vaqt: &#8221; + now.ToString());<br \/>\nConsole.WriteLine(&#8220;Yil\/Oy\/Kun: &#8221; + now.ToString(&#8220;yyyy\/MM\/dd&#8221;));<br \/>\nConsole.WriteLine(&#8220;Kun-Oy-Yil: &#8221; + now.ToString(&#8220;dd-MM-yyyy&#8221;));<br \/>\nConsole.WriteLine(&#8220;Soat:Daqiqa:Soniy: &#8221; + now.ToString(&#8220;HH:mm:ss&#8221;));<\/p>\n<p>    \u0648\u0627\u0631\u062f \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u0634\u0648\u06cc\u062f<\/p>\n<p>    \u0627\u0632 \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u062e\u0627\u0631\u062c \u0634\u0648\u06cc\u062f<\/p>\n<p>Bu kod sanani turli formatlarda ekranga chiqaradi.<\/p>\n<p>\u0641\u0631\u0645\u062a \u0647\u0627\u06cc \u0648\u06cc\u0698\u0647\u06cc\u06a9 \u0631\u0634\u062a\u0647 \u0641\u0631\u0645\u062a \u0633\u0641\u0627\u0631\u0634\u06cc \u0631\u0627 \u0645\u06cc \u062a\u0648\u0627\u0646 \u0628\u0647 \u0645\u062a\u062f ToString \u0627\u0631\u0633\u0627\u0644 \u06a9\u0631\u062f.<\/p>\n<p>DateTime now = DateTime.Now;<br \/>\nstring customFormat = &#8220;dddd, dd MMMM yyyy HH:mm:ss&#8221;;<br \/>\nConsole.WriteLine(&#8220;Maxsus format: &#8221; + now.ToString(customFormat));<\/p>\n<p>    \u0648\u0627\u0631\u062f \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u0634\u0648\u06cc\u062f<\/p>\n<p>    \u0627\u0632 \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u062e\u0627\u0631\u062c \u0634\u0648\u06cc\u062f<\/p>\n<p>Bu kod sanani &#8220;Wednesday, 31 July 2024 14:30:00&#8221; kabi formatda chiqaradi.<\/p>\n<p>\u0627\u0636\u0627\u0641\u0647 \u0648 \u062a\u0641\u0631\u06cc\u0642 \u062a\u0627\u0631\u06cc\u062e \u0648 \u0632\u0645\u0627\u0646\u062a\u0627\u0631\u06cc\u062e \u0648 \u0632\u0645\u0627\u0646 \u0631\u0627 \u0627\u0636\u0627\u0641\u0647 \u06a9\u0646\u06cc\u062f\u0627\u0632 \u0631\u0648\u0634 \u0647\u0627\u06cc AddDays\u060c AddMonths\u060c AddYears \u0648 \u063a\u06cc\u0631\u0647 \u0645\u06cc \u062a\u0648\u0627\u0646 \u0628\u0631\u0627\u06cc \u0627\u0641\u0632\u0648\u062f\u0646 \u0632\u0645\u0627\u0646 \u0647\u0627\u06cc \u0645\u062e\u062a\u0644\u0641 \u0628\u0647 \u06cc\u06a9 \u0634\u06cc DateTime \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0631\u062f.<\/p>\n<p>DateTime now = DateTime.Now;<br \/>\nDateTime nextWeek = now.AddDays(7);<br \/>\nDateTime nextMonth = now.AddMonths(1);<br \/>\nDateTime nextYear = now.AddYears(1);<br \/>\nConsole.WriteLine(&#8220;Bir hafta keyin: &#8221; + nextWeek);<br \/>\nConsole.WriteLine(&#8220;Bir oy keyin: &#8221; + nextMonth);<br \/>\nConsole.WriteLine(&#8220;Bir yil keyin: &#8221; + nextYear);<\/p>\n<p>    \u0648\u0627\u0631\u062f \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u0634\u0648\u06cc\u062f<\/p>\n<p>    \u0627\u0632 \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u062e\u0627\u0631\u062c \u0634\u0648\u06cc\u062f<\/p>\n<p>Bu kod hozirgi vaqtga bir hafta, bir oy va bir yil qo&#8217;shib, yangi sanalarni hisoblaydi.<\/p>\n<p>\u062a\u0642\u0633\u06cc\u0645 \u062a\u0627\u0631\u06cc\u062e \u0648 \u0632\u0645\u0627\u0646\u0627\u0632 \u0647\u0645\u06cc\u0646 \u0631\u0648\u0634 \u0647\u0627 \u0645\u06cc \u062a\u0648\u0627\u0646 \u0628\u0631\u0627\u06cc \u06a9\u0645 \u06a9\u0631\u062f\u0646 \u0632\u0645\u0627\u0646 \u0627\u0632 \u062a\u0627\u0631\u06cc\u062e \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0631\u062f.<\/p>\n<p>DateTime now = DateTime.Now;<br \/>\nDateTime lastWeek = now.AddDays(-7);<br \/>\nDateTime lastMonth = now.AddMonths(-1);<br \/>\nDateTime lastYear = now.AddYears(-1);<br \/>\nConsole.WriteLine(&#8220;Bir hafta oldin: &#8221; + lastWeek);<br \/>\nConsole.WriteLine(&#8220;Bir oy oldin: &#8221; + lastMonth);<br \/>\nConsole.WriteLine(&#8220;Bir yil oldin: &#8221; + lastYear);<\/p>\n<p>    \u0648\u0627\u0631\u062f \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u0634\u0648\u06cc\u062f<\/p>\n<p>    \u0627\u0632 \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u062e\u0627\u0631\u062c \u0634\u0648\u06cc\u062f<\/p>\n<p>Bu kod hozirgi sanadan bir hafta, bir oy va bir yil ayirib, yangi sanalarni hisoblaydi.<\/p>\n<p>\u0627\u0645\u06cc\u062f\u0648\u0627\u0631\u0645 \u0627\u06cc\u0646 \u062a\u0648\u0636\u06cc\u062d\u0627\u062a \u0648 \u0645\u062b\u0627\u0644 \u0647\u0627 \u0628\u0647 \u0634\u0645\u0627 \u062f\u0631 \u062f\u0631\u06a9 \u0628\u0647\u062a\u0631 \u0646\u062d\u0648\u0647 \u06a9\u0627\u0631 \u0628\u0627 DateTime \u06a9\u0645\u06a9 \u06a9\u0646\u062f!  \u0627\u06af\u0631 \u0633\u0648\u0627\u0644 \u062f\u06cc\u06af\u0631\u06cc \u062f\u0627\u0631\u06cc\u062f\u060c \u062f\u0631 \u0635\u0648\u0631\u062a \u062a\u0645\u0627\u06cc\u0644 \u0628\u067e\u0631\u0633\u06cc\u062f.<\/p>\n<div data-article-id=\"1942845\" id=\"article-body\">\n<p>Assalamu alaykum \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u0627\u0646 \u0639\u0632\u06cc\u0632 \u0646\u062d\u0648\u0647 \u06a9\u0627\u0631 \u0628\u0627 DateTime \u0631\u0648 \u06a9\u0627\u0645\u0644 \u0648 \u0642\u0627\u0628\u0644 \u0641\u0647\u0645 \u062a\u0648\u0636\u06cc\u062d \u0628\u062f\u0645.  \u0647\u0631 \u0645\u0631\u062d\u0644\u0647 \u0631\u0627 \u0628\u0627 \u0645\u062b\u0627\u0644 \u062a\u0648\u0636\u06cc\u062d \u062e\u0648\u0627\u0647\u0645 \u062f\u0627\u062f.<\/p>\n<p>\u0627\u06cc\u062c\u0627\u062f \u06cc\u06a9 \u0634\u06cc\u0621 DateTime<br \/>\u06af\u0631\u0641\u062a\u0646 \u0632\u0645\u0627\u0646 \u062d\u0627\u0644<br \/>DateTime.Now \u062a\u0627\u0631\u06cc\u062e \u0648 \u0632\u0645\u0627\u0646 \u0641\u0639\u0644\u06cc \u0631\u0627 \u0628\u0631\u0645\u06cc \u06af\u0631\u062f\u0627\u0646\u062f.<\/p>\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight plaintext\"><code>DateTime now = DateTime.Now;\nConsole.WriteLine(\"Hozirgi vaqt: \" + now);\n\n<\/code><\/pre>\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\">\n    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-on\"><title>\u0648\u0627\u0631\u062f \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u0634\u0648\u06cc\u062f<\/title>\n    <path d=\"M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z\"\/>\n<\/svg><\/p>\n<p>    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-off\"><title>\u0627\u0632 \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u062e\u0627\u0631\u062c \u0634\u0648\u06cc\u062f<\/title>\n    <path d=\"M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z\"\/>\n<\/svg><\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><code>Bu kod hozirgi kompyuter vaqti va sanasini ekranga chiqaradi.<\/code><\/p>\n<p>\u062a\u0627\u0631\u06cc\u062e \u0648 \u0632\u0645\u0627\u0646 \u062f\u0642\u06cc\u0642 \u0631\u0627 \u0627\u06cc\u062c\u0627\u062f \u06a9\u0646\u06cc\u062f<br \/>\u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0633\u0627\u0632\u0646\u062f\u0647 DateTime\u060c \u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u062f \u062a\u0627\u0631\u06cc\u062e \u0648 \u0632\u0645\u0627\u0646 \u062f\u0642\u06cc\u0642\u06cc \u0631\u0627 \u062a\u0646\u0638\u06cc\u0645 \u06a9\u0646\u06cc\u062f.<\/p>\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight plaintext\"><code>DateTime specificDate = new DateTime(2024, 7, 31, 14, 30, 0); \/\/ 2024 yil 31-iyul, 14:30:00\nConsole.WriteLine(\"Aniq sana va vaqt: \" + specificDate);\n\n<\/code><\/pre>\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\">\n    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-on\"><title>\u0648\u0627\u0631\u062f \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u0634\u0648\u06cc\u062f<\/title>\n    <path d=\"M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z\"\/>\n<\/svg><\/p>\n<p>    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-off\"><title>\u0627\u0632 \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u062e\u0627\u0631\u062c \u0634\u0648\u06cc\u062f<\/title>\n    <path d=\"M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z\"\/>\n<\/svg><\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><code>Bu kod 2024 yil 31-iyul kuni soat 14:30:00 ni ifodalaydi.<\/code><\/p>\n<p>\u0641\u0642\u0637 \u062a\u0627\u0631\u06cc\u062e<br \/>\u0641\u0642\u0637 \u0628\u0631\u0627\u06cc \u0627\u06cc\u062c\u0627\u062f \u062a\u0627\u0631\u06cc\u062e\u060c \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u06cc\u062f \u06cc\u06a9 \u0634\u06cc\u0621 DateTime \u0628\u062f\u0648\u0646 \u062f\u0631\u062c \u0628\u062e\u0634\u06cc \u0632\u0645\u0627\u0646 \u0627\u06cc\u062c\u0627\u062f \u06a9\u0646\u06cc\u062f.<\/p>\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight plaintext\"><code>DateTime specificDateOnly = new DateTime(2024, 7, 31);\nConsole.WriteLine(\"Aniq sana: \" + specificDateOnly.ToShortDateString());\n\n<\/code><\/pre>\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\">\n    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-on\"><title>\u0648\u0627\u0631\u062f \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u0634\u0648\u06cc\u062f<\/title>\n    <path d=\"M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z\"\/>\n<\/svg><\/p>\n<p>    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-off\"><title>\u0627\u0632 \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u062e\u0627\u0631\u062c \u0634\u0648\u06cc\u062f<\/title>\n    <path d=\"M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z\"\/>\n<\/svg><\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><code>Bu kod sanani 2024 yil 31-iyul qilib belgilaydi va vaqtni 00:00:00 qilib o'rnatadi.<\/code><\/p>\n<p>\u062f\u0631\u06cc\u0627\u0641\u062a \u0642\u0637\u0639\u0627\u062a \u0645\u062e\u062a\u0644\u0641 \u0627\u0632 \u06cc\u06a9 DateTime<br \/>\u0633\u0627\u0644\u060c \u0645\u0627\u0647\u060c \u0631\u0648\u0632\u060c \u0633\u0627\u0639\u062a \u0648 \u0645\u0648\u0627\u0631\u062f \u062f\u06cc\u06af\u0631<br \/>\u0628\u062e\u0634 \u0647\u0627\u06cc \u0633\u0627\u0644\u060c \u0645\u0627\u0647\u060c \u0631\u0648\u0632 \u0648 \u0632\u0645\u0627\u0646 \u0631\u0627 \u0645\u06cc \u062a\u0648\u0627\u0646 \u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0648\u06cc\u0698\u06af\u06cc \u0647\u0627\u06cc \u0645\u062e\u062a\u0644\u0641 \u0634\u06cc DateTime \u0627\u0633\u062a\u062e\u0631\u0627\u062c \u06a9\u0631\u062f.<\/p>\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight plaintext\"><code>DateTime now = DateTime.Now;\nConsole.WriteLine(\"Yil: \" + now.Year);\nConsole.WriteLine(\"Oy: \" + now.Month);\nConsole.WriteLine(\"Kun: \" + now.Day);\nConsole.WriteLine(\"Soat: \" + now.Hour);\nConsole.WriteLine(\"Daqiqa: \" + now.Minute);\nConsole.WriteLine(\"Soniy: \" + now.Second);\n\n<\/code><\/pre>\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\">\n    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-on\"><title>\u0648\u0627\u0631\u062f \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u0634\u0648\u06cc\u062f<\/title>\n    <path d=\"M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z\"\/>\n<\/svg><\/p>\n<p>    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-off\"><title>\u0627\u0632 \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u062e\u0627\u0631\u062c \u0634\u0648\u06cc\u062f<\/title>\n    <path d=\"M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z\"\/>\n<\/svg><\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><code>Bu kod hozirgi yil, oy, kun, soat, daqiqa va soniyani ekranga chiqaradi.<\/code><\/p>\n<p>\u0645\u062d\u0627\u0633\u0628\u0647 \u062a\u0641\u0627\u0648\u062a \u0628\u06cc\u0646 \u062a\u0627\u0631\u06cc\u062e \u0647\u0627<br \/>\u0634\u0645\u0627\u0631\u0634 \u062a\u0639\u062f\u0627\u062f \u0631\u0648\u0632\u0647\u0627<br \/>\u0628\u0631\u0627\u06cc \u0645\u062d\u0627\u0633\u0628\u0647 \u062a\u0641\u0627\u0648\u062a \u0628\u06cc\u0646 \u062a\u0627\u0631\u06cc\u062e \u0647\u0627\u060c \u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u062f \u062a\u0641\u0627\u0648\u062a \u0628\u06cc\u0646 \u062f\u0648 \u0634\u06cc DateTime \u0631\u0627 \u0628\u062f\u0633\u062a \u0622\u0648\u0631\u06cc\u062f.<\/p>\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight plaintext\"><code>DateTime startDate = new DateTime(2024, 1, 1);\nDateTime endDate = new DateTime(2024, 7, 31);\nTimeSpan difference = endDate - startDate;\nConsole.WriteLine(\"Kunlar soni: \" + difference.Days);\n\n<\/code><\/pre>\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\">\n    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-on\"><title>\u0648\u0627\u0631\u062f \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u0634\u0648\u06cc\u062f<\/title>\n    <path d=\"M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z\"\/>\n<\/svg><\/p>\n<p>    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-off\"><title>\u0627\u0632 \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u062e\u0627\u0631\u062c \u0634\u0648\u06cc\u062f<\/title>\n    <path d=\"M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z\"\/>\n<\/svg><\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><code>Bu kod 2024 yil 1-yanvardan 2024 yil 31-iyulgacha bo'lgan kunlar sonini hisoblaydi.<\/code><\/p>\n<p>\u062a\u0641\u0627\u0648\u062a \u0632\u0645\u0627\u0646\u06cc<br \/>\u0647\u0645\u0686\u0646\u06cc\u0646 \u0627\u0645\u06a9\u0627\u0646 \u062a\u0639\u06cc\u06cc\u0646 \u062a\u0641\u0627\u0648\u062a \u0632\u0645\u0627\u0646\u06cc \u0628\u06cc\u0646 \u062a\u0627\u0631\u06cc\u062e \u0647\u0627 \u0648\u062c\u0648\u062f \u062f\u0627\u0631\u062f.<\/p>\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight plaintext\"><code>DateTime startTime = new DateTime(2024, 7, 31, 8, 0, 0); \/\/ 2024-07-31 08:00:00\nDateTime endTime = new DateTime(2024, 7, 31, 17, 30, 0); \/\/ 2024-07-31 17:30:00\nTimeSpan timeDifference = endTime - startTime;\nConsole.WriteLine(\"Soatlar soni: \" + timeDifference.TotalHours);\nConsole.WriteLine(\"Daqiqalar soni: \" + timeDifference.TotalMinutes);\n\n<\/code><\/pre>\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\">\n    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-on\"><title>\u0648\u0627\u0631\u062f \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u0634\u0648\u06cc\u062f<\/title>\n    <path d=\"M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z\"\/>\n<\/svg><\/p>\n<p>    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-off\"><title>\u0627\u0632 \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u062e\u0627\u0631\u062c \u0634\u0648\u06cc\u062f<\/title>\n    <path d=\"M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z\"\/>\n<\/svg><\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><code>Bu kod 2024 yil 31-iyul kuni soat 8:00 dan 17:30 gacha bo'lgan vaqt farqini hisoblaydi.<\/code><\/p>\n<p>\u0642\u0627\u0644\u0628 \u0628\u0646\u062f\u06cc \u062a\u0627\u0631\u06cc\u062e<br \/>\u0641\u0631\u0645\u062a \u0647\u0627\u06cc \u0631\u0627\u06cc\u062c<br \/>\u062a\u0627\u0631\u06cc\u062e \u0631\u0627 \u0645\u06cc \u062a\u0648\u0627\u0646 \u062f\u0631 \u0641\u0631\u0645\u062a \u0647\u0627\u06cc \u0645\u062e\u062a\u0644\u0641 \u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0631\u0648\u0634 ToString \u062e\u0631\u0648\u062c\u06cc \u062f\u0627\u062f.<\/p>\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight plaintext\"><code>DateTime now = DateTime.Now;\nConsole.WriteLine(\"To'liq sana va vaqt: \" + now.ToString());\nConsole.WriteLine(\"Yil\/Oy\/Kun: \" + now.ToString(\"yyyy\/MM\/dd\"));\nConsole.WriteLine(\"Kun-Oy-Yil: \" + now.ToString(\"dd-MM-yyyy\"));\nConsole.WriteLine(\"Soat:Daqiqa:Soniy: \" + now.ToString(\"HH:mm:ss\"));\n\n<\/code><\/pre>\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\">\n    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-on\"><title>\u0648\u0627\u0631\u062f \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u0634\u0648\u06cc\u062f<\/title>\n    <path d=\"M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z\"\/>\n<\/svg><\/p>\n<p>    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-off\"><title>\u0627\u0632 \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u062e\u0627\u0631\u062c \u0634\u0648\u06cc\u062f<\/title>\n    <path d=\"M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z\"\/>\n<\/svg><\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><code>Bu kod sanani turli formatlarda ekranga chiqaradi.<\/code><\/p>\n<p>\u0641\u0631\u0645\u062a \u0647\u0627\u06cc \u0648\u06cc\u0698\u0647<br \/>\u06cc\u06a9 \u0631\u0634\u062a\u0647 \u0641\u0631\u0645\u062a \u0633\u0641\u0627\u0631\u0634\u06cc \u0631\u0627 \u0645\u06cc \u062a\u0648\u0627\u0646 \u0628\u0647 \u0645\u062a\u062f ToString \u0627\u0631\u0633\u0627\u0644 \u06a9\u0631\u062f.<\/p>\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight plaintext\"><code>DateTime now = DateTime.Now;\nstring customFormat = \"dddd, dd MMMM yyyy HH:mm:ss\";\nConsole.WriteLine(\"Maxsus format: \" + now.ToString(customFormat));\n\n<\/code><\/pre>\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\">\n    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-on\"><title>\u0648\u0627\u0631\u062f \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u0634\u0648\u06cc\u062f<\/title>\n    <path d=\"M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z\"\/>\n<\/svg><\/p>\n<p>    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-off\"><title>\u0627\u0632 \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u062e\u0627\u0631\u062c \u0634\u0648\u06cc\u062f<\/title>\n    <path d=\"M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z\"\/>\n<\/svg><\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><code>Bu kod sanani \"Wednesday, 31 July 2024 14:30:00\" kabi formatda chiqaradi.<br \/><\/code><\/p>\n<p>\u0627\u0636\u0627\u0641\u0647 \u0648 \u062a\u0641\u0631\u06cc\u0642 \u062a\u0627\u0631\u06cc\u062e \u0648 \u0632\u0645\u0627\u0646<br \/>\u062a\u0627\u0631\u06cc\u062e \u0648 \u0632\u0645\u0627\u0646 \u0631\u0627 \u0627\u0636\u0627\u0641\u0647 \u06a9\u0646\u06cc\u062f<br \/>\u0627\u0632 \u0631\u0648\u0634 \u0647\u0627\u06cc AddDays\u060c AddMonths\u060c AddYears \u0648 \u063a\u06cc\u0631\u0647 \u0645\u06cc \u062a\u0648\u0627\u0646 \u0628\u0631\u0627\u06cc \u0627\u0641\u0632\u0648\u062f\u0646 \u0632\u0645\u0627\u0646 \u0647\u0627\u06cc \u0645\u062e\u062a\u0644\u0641 \u0628\u0647 \u06cc\u06a9 \u0634\u06cc DateTime \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0631\u062f.<\/p>\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight plaintext\"><code>DateTime now = DateTime.Now;\nDateTime nextWeek = now.AddDays(7);\nDateTime nextMonth = now.AddMonths(1);\nDateTime nextYear = now.AddYears(1);\nConsole.WriteLine(\"Bir hafta keyin: \" + nextWeek);\nConsole.WriteLine(\"Bir oy keyin: \" + nextMonth);\nConsole.WriteLine(\"Bir yil keyin: \" + nextYear);\n\n<\/code><\/pre>\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\">\n    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-on\"><title>\u0648\u0627\u0631\u062f \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u0634\u0648\u06cc\u062f<\/title>\n    <path d=\"M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z\"\/>\n<\/svg><\/p>\n<p>    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-off\"><title>\u0627\u0632 \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u062e\u0627\u0631\u062c \u0634\u0648\u06cc\u062f<\/title>\n    <path d=\"M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z\"\/>\n<\/svg><\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><code>Bu kod hozirgi vaqtga bir hafta, bir oy va bir yil qo'shib, yangi sanalarni hisoblaydi.<\/code><\/p>\n<p>\u062a\u0642\u0633\u06cc\u0645 \u062a\u0627\u0631\u06cc\u062e \u0648 \u0632\u0645\u0627\u0646<br \/>\u0627\u0632 \u0647\u0645\u06cc\u0646 \u0631\u0648\u0634 \u0647\u0627 \u0645\u06cc \u062a\u0648\u0627\u0646 \u0628\u0631\u0627\u06cc \u06a9\u0645 \u06a9\u0631\u062f\u0646 \u0632\u0645\u0627\u0646 \u0627\u0632 \u062a\u0627\u0631\u06cc\u062e \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0631\u062f.<\/p>\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight plaintext\"><code>DateTime now = DateTime.Now;\nDateTime lastWeek = now.AddDays(-7);\nDateTime lastMonth = now.AddMonths(-1);\nDateTime lastYear = now.AddYears(-1);\nConsole.WriteLine(\"Bir hafta oldin: \" + lastWeek);\nConsole.WriteLine(\"Bir oy oldin: \" + lastMonth);\nConsole.WriteLine(\"Bir yil oldin: \" + lastYear);\n\n<\/code><\/pre>\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\">\n    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-on\"><title>\u0648\u0627\u0631\u062f \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u0634\u0648\u06cc\u062f<\/title>\n    <path d=\"M16 3h6v6h-2V5h-4V3zM2 3h6v2H4v4H2V3zm18 16v-4h2v6h-6v-2h4zM4 19h4v2H2v-6h2v4z\"\/>\n<\/svg><\/p>\n<p>    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" class=\"highlight-action crayons-icon highlight-action--fullscreen-off\"><title>\u0627\u0632 \u062d\u0627\u0644\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u062e\u0627\u0631\u062c \u0634\u0648\u06cc\u062f<\/title>\n    <path d=\"M18 7h4v2h-6V3h2v4zM8 9H2V7h4V3h2v6zm10 8v4h-2v-6h6v2h-4zM8 15v6H6v-4H2v-2h6z\"\/>\n<\/svg><\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><code>Bu kod hozirgi sanadan bir hafta, bir oy va bir yil ayirib, yangi sanalarni hisoblaydi.<\/code><\/p>\n<p>\u0627\u0645\u06cc\u062f\u0648\u0627\u0631\u0645 \u0627\u06cc\u0646 \u062a\u0648\u0636\u06cc\u062d\u0627\u062a \u0648 \u0645\u062b\u0627\u0644 \u0647\u0627 \u0628\u0647 \u0634\u0645\u0627 \u062f\u0631 \u062f\u0631\u06a9 \u0628\u0647\u062a\u0631 \u0646\u062d\u0648\u0647 \u06a9\u0627\u0631 \u0628\u0627 DateTime \u06a9\u0645\u06a9 \u06a9\u0646\u062f!  \u0627\u06af\u0631 \u0633\u0648\u0627\u0644 \u062f\u06cc\u06af\u0631\u06cc \u062f\u0627\u0631\u06cc\u062f\u060c \u062f\u0631 \u0635\u0648\u0631\u062a \u062a\u0645\u0627\u06cc\u0644 \u0628\u067e\u0631\u0633\u06cc\u062f.<\/p>\n<\/p><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Summarize this content to 400 words in Persian Lang Assalamu alaykum \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u0627\u0646 \u0639\u0632\u06cc\u0632 \u0646\u062d\u0648\u0647 \u06a9\u0627\u0631 \u0628\u0627 DateTime \u0631\u0648 \u06a9\u0627\u0645\u0644 \u0648 \u0642\u0627\u0628\u0644 \u0641\u0647\u0645 \u062a\u0648\u0636\u06cc\u062d \u0628\u062f\u0645. \u0647\u0631 \u0645\u0631\u062d\u0644\u0647 \u0631\u0627 \u0628\u0627 \u0645\u062b\u0627\u0644 \u062a\u0648\u0636\u06cc\u062d \u062e\u0648\u0627\u0647\u0645 \u062f\u0627\u062f. \u0627\u06cc\u062c\u0627\u062f \u06cc\u06a9 \u0634\u06cc\u0621 DateTime\u06af\u0631\u0641\u062a\u0646 \u0632\u0645\u0627\u0646 \u062d\u0627\u0644DateTime.Now \u062a\u0627\u0631\u06cc\u062e \u0648 \u0632\u0645\u0627\u0646 \u0641\u0639\u0644\u06cc \u0631\u0627 \u0628\u0631\u0645\u06cc \u06af\u0631\u062f\u0627\u0646\u062f. DateTime now = DateTime.Now; Console.WriteLine(&#8220;Hozirgi vaqt: &#8221; + now); &hellip;<\/p>\n","protected":false},"author":2,"featured_media":71670,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"fifu_image_url":"","fifu_image_alt":"","footnotes":""},"categories":[339],"tags":[],"class_list":["post-71669","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-dev"],"_links":{"self":[{"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/posts\/71669","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/comments?post=71669"}],"version-history":[{"count":0,"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/posts\/71669\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/media\/71670"}],"wp:attachment":[{"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/media?parent=71669"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/categories?post=71669"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nabfollower.com\/blog\/wp-json\/wp\/v2\/tags?post=71669"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}