Search the Community
Showing results for tags 'date'.
-
سلام دوستان مطلبی که می نویسنم ارتباطی به UNIGUI ندارد ولی مشکل بسیاری از برنامه نویسان ایرانی است . اگر بخواهید با تاریخ شمسی در اسکیوال سرور( از 2000 تا 2019) کار کنید به 2 مساله نیاز دارید 1- تبدیل تاریخ 2- توضیحات یک تاریخ برای حل این مسائل دوفایل زیر را می توانید استفاده کنید . لازم به ذکر است که یک مشکل در تبدیل تاریخ شمسی هر 52 سال یکبار اتفاق می افتد که این راه حل ها ، این مشکل را ندارند. ابتدا برای یادگیری یا تست یک دیتابیس خالی بسازید و بعد این دو فایل را در آنها اجرا کنید حال برای تست می توانید با کمک دستورات زیر یادبگیرید Select Dbo.E2F(Getdate()) تاریخ امروز به شمسی ، هر تاریخ دیگری را نیز می توانید به صورت DateTime ارسال کنید Select Dbo.F2E('1403/09/08') تاریخ امروز به میلادی Select * From ECal از این جدول نه تنها هر تاریخ شمسی یا میلادی را می توانید به صورت عددی و رشته ایی بگیرید ، بلکه می توانید مواردی مانند ماه و هفته و فصل و حتی معادل قمری آن را نیز دریافت کنید که با ترکیب آنها با هر جدولی برای داشبورد ها یک منبع عالی خواهید داشت امیدوارم این مطلب مفید باشد Hello friends, The topic I'm writing about is not related to UNIGUI, but it is an issue many Iranian programmers face. If you want to work with the Persian (Jalali) calendar in SQL Server (from 2000 to 2019), there are two things you need: Date conversion Explanation of a date To solve these issues, you can use the two files below. It is worth mentioning that there is a problem in converting the Persian calendar that occurs once every 52 years, but these solutions do not have that issue. First, create an empty database for learning or testing, then execute these two files in it. Now, for testing, you can learn with the following commands: Select Dbo.E2F(Getdate()) This will give you today's date in the Persian calendar. You can also send any other DateTime to get the corresponding Persian date. Select Dbo.F2E('1403/09/08') This will convert today's date to the Gregorian calendar. Select * From ECal From this table, you can not only get any Persian or Gregorian date in numeric or string format, but you can also retrieve details like month, week, season, and even its lunar equivalent. By combining these with any table, you will have an excellent data source for dashboards. Enjoy ... SQL.rar
- 2 replies
-
- 1
-
-
- persian calendar
- sql server
-
(and 4 more)
Tagged with:
-
Hello everybody! Please, I'm racking my brains to solve the date format. At the date VCL is exactly as I want, but when I compile and publish in IIS format is completely different. Have I set the regional settings of the server, but to no avail. Thanks for your help.
-
Hi! I have a UniDbGrid in a project and one of the columns has a TDateTime field and it has an associated UniDateTimePicker in the Editor property. When the program is executed and I insert a new record, in the date field if I report an incorrect date value, the behavior is that I cancel the record that I am loading instead of generating a message informing that the date entered is incorrect. How can I avoid canceling the registration and generating the message with the error and the possibility for the user to correct it?. Thanks in advance
- 4 replies
-
- unidatetimepicker
- cancel
-
(and 3 more)
Tagged with:
-
Hello, I need to enter 31.12.9999 in a UniDBDateTimePicker but it was automatically reset to 01.12.9999. Even if the value in DB (SQL Server) is 31.12.9999, then the Picker shows everytime 01.12.9999. Behavour in VCL Delphi TDateTimePicker is, that I can enter 31.12.9999. I need this for open end date. Is there a fix? I use Personal_1.0.0.1378_RC Greetings Marcus