Home > Back-end >  Delphi relevant!!!!!!
Delphi relevant!!!!!!

Time:11-07

Delphi with loop statement "input (date) (month) (year) output is the which day of the year"!!!!!! Ahhh thank you bosses!!!

CodePudding user response:

DateUtils, DayOfTheYear function can use the

DayOfTheYear (dtpSomeDay DateTime)

CodePudding user response:

reference 1st floor doloopcn response:
reference DateUtils, it is ok to use DayOfTheYear function

DayOfTheYear (dtpSomeDay DateTime)


[error] Unit1. Pas (30) : Undeclared identifier: 'dtpSomeDay'

I detect the problems, strange

CodePudding user response:

The somebody else is required to enter (date) (month) (year), then use cycle, involving several time here is processing function:
Turn 1, the date string DateTime, use StrToDateTime
2, EndOfTheYear can obtain the last day of the specified date
3, StartOfTheYear to get the date specified on the first day of year date
In 4, cycle accumulation in IncDay date, judge with the input date interval DaysBetween (function) is 0, if is 0, end of the cycle, also know that the first x days

CodePudding user response:

refer to the second floor of shandong blue jays pay your response:
Quote: refer to 1st floor doloopcn response:

DateUtils, DayOfTheYear function can use the

DayOfTheYear (dtpSomeDay DateTime)


[error] Unit1. Pas (30) : Undeclared identifier: 'dtpSomeDay'

I detect the problems, strange


DtpSomeDay is test DateTimePicker control -_ -

CodePudding user response:

Thank you for your comment, I'll study it
  • Related