Jump to content
Son zamanlarda artan kullanıcı hesap hırsızlıkları sebebiyle tüm kullanıcılara şifre sıfırlama maili gönderilmiştir. Lütfen güveli şifreler seçiniz. Mevcut e-mail adresinize erişemiyorsanız, en aşağıdaki destek linkinden bize ulaşınız. ×

Tarihsel Işlemler


korasoglu
 Share

Recommended Posts

Arkadaşlar diyelimki dateEdit ile ocak ayının beşinni  gününü sallma salıyı seçtim diğer kalan aylarda dahil döngü içerisinde  aynı gün hangi tarihlere dekkeliyorsa nasıl alabilirim yani seçtiğim bes salı ise bir sonraki ayda aynı salı hangi tarihe dekkliyorsa.

Link to comment
Share on other sites

korasoglu, 18.11.2017 - 12:42 yazdı:

Arkadaşlar diyelimki dateEdit ile ocak ayının beşinni  gününü sallma salıyı seçtim diğer kalan aylarda dahil döngü içerisinde  aynı gün hangi tarihlere dekkeliyorsa nasıl alabilirim yani seçtiğim bes salı ise bir sonraki ayda aynı salı hangi tarihe dekkliyorsa.

Saat ve tarih ile yazılımlar war onları araştırıp bulsanız 

Link to comment
Share on other sites

DateTime dateTime = dateTimePicker1.Value; //dateTimePicker'ı forma eklediyseniz böyle aldım.
            int day = Convert.ToInt32(dateTime.DayOfWeek); //haftanın kaçıncı günü lazım diye baktım.
            DateTime temp = dateTime.AddMonths(1); //geçici bişey oluşturup bir ay ekledim
            if (Convert.ToInt32(temp.DayOfWeek) > day)
            {
                do
                {
                    temp = temp.AddDays(-1);
                } while (Convert.ToInt32(temp.DayOfWeek) != day);
                
            }
            else if (Convert.ToInt32(temp.DayOfWeek) < day)
            {
                do
                {
                    temp = temp.AddDays(1);
                } while (Convert.ToInt32(temp.DayOfWeek) != day);
            }
            MessageBox.Show(temp.ToString());
	

Yanlış anlamadıysam bu

Edited by Extended
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...