Complied Data Decompling

  • Thread starter Thread starter pmclinn
  • Start date Start date
P

pmclinn

Hello,

I de-complie some old code and I have this line that I cannot
re-convert to vb.net compatible code.

time1 = #1/2/2005# 'Date variable

DateAndTime.DatePart(2, time1, 1, 1)

I have looked over the info for this function and I'm at a lost as to
the function parts here... specifically (2, time1, 1, 1).

It look s like the 2 refers to a day or minute or something, and the
time1 I understand but the following to 1,1's I cannot figure out.

Any Ideas?
 
I just did a test sample. I should of done this in the first place....


Dim num(10) As Integer

num(0) = DateAndTime.DatePart(DateInterval.Day, Now) 'day
num(1) = DateAndTime.DatePart(DateInterval.DayOfYear, Now)
'DayofYear
num(2) = DateAndTime.DatePart(DateInterval.Hour, Now) 'Hour
num(3) = DateAndTime.DatePart(DateInterval.Minute, Now) 'Minute
num(4) = DateAndTime.DatePart(DateInterval.Month, Now) 'Month
num(5) = DateAndTime.DatePart(DateInterval.Quarter, Now)
'Quarter
num(6) = DateAndTime.DatePart(DateInterval.Second, Now) 'Second
num(7) = DateAndTime.DatePart(DateInterval.Weekday, Now)
'Weekday
num(8) = DateAndTime.DatePart(DateInterval.WeekOfYear, Now)
'WeekOfYear
num(9) = DateAndTime.DatePart(DateInterval.Year, Now) 'year
'Dim numArray1 As Integer() = New Integer(13 - 1) {}
'numArray1(0) = DateAndTime.DatePart(4, DateAndTime.get_Now, 1,
1)
'numArray1(1) = DateAndTime.DatePart(3, DateAndTime.get_Now, 1,
1)
'numArray1(2) = DateAndTime.DatePart(7, DateAndTime.get_Now, 1,
1)
'numArray1(3) = DateAndTime.DatePart(8, DateAndTime.get_Now, 1,
1)
'numArray1(4) = DateAndTime.DatePart(2, DateAndTime.get_Now, 1,
1)
'numArray1(5) = DateAndTime.DatePart(1, DateAndTime.get_Now, 1,
1)
'numArray1(6) = DateAndTime.DatePart(9, DateAndTime.get_Now, 1,
1)
'numArray1(7) = DateAndTime.DatePart(6, DateAndTime.get_Now, 1,
1)
'numArray1(8) = DateAndTime.DatePart(5, DateAndTime.get_Now, 1,
1)
'numArray1(9) = DateAndTime.DatePart(0, DateAndTime.get_Now, 1,
1)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top