• 🌙 Community Spirit

    Ramadan Mubarak! To honor this month, Crax has paused NSFW categories. Wishing you peace and growth!

Question program to get astral date (Visual C#) (1 Viewer)

Currently reading:
 Question program to get astral date (Visual C#) (1 Viewer)

Thread represents a question
Recently searched:

zanmatt27

Member
LV
2
Joined
Mar 5, 2023
Threads
10
Likes
8
Awards
6
Credits
2,718©
Cash
0$
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Data_Astrale
{
public partial class frmDataastrale : Form
{
public frmDataastrale()
{
InitializeComponent();
}

private void tmrOra_Tick(object sender, EventArgs e)
{
lblOra.Text = String.Format("{0:T}", DateTime.Now);
}

private void tmrData_Tick(object sender, EventArgs e)
{
DateTime D = new DateTime();
D = DateTime.Now;
int anno, giorno, ora, minuti, secondi;

anno = D.Year;
giorno = D.DayOfYear;
ora = D.Hour;
minuti = D.Minute;
secondi = D.Second;


lblData.Text = String.Format("{0:D}", D);

if(DateTime.IsLeapYear(D.Year))
{
lblDataAstrale.Text = ((((anno - 2023) + (giorno / 366)) * 1000) + (((ora * 3600) + (minuti * 60) + secondi) * 0.00003162315)).ToString();
}
else
{
lblDataAstrale.Text = ((((anno - 2023) + (giorno / 365)) * 1000) + (((ora * 3600) + (minuti * 60) + secondi) * 0.00003170979)).ToString();
}
}

private void lblDataAstrale_Click(object sender, EventArgs e)
{

}
}
}
 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Tips
Recently searched:

Users who are viewing this thread

Top Bottom