473,396 Members | 1,938 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Complied Data Decompling

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?

Nov 21 '05 #1
1 1348
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)

Nov 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: lawrence | last post by:
I had some code that worked fine for several weeks, and then yesterday it stopped working. I'm not sure what I did. Nor can I make out why it isn't working. I'm running a query that should return 3...
65
by: Pmb | last post by:
I'm confused as to what the compiler error message I'm getting is refering to. Can someone take a gander and let me know what I did wrong? The program is below. When I compile it I get the...
0
by: NicK chlam via DotNetMonster.com | last post by:
this is the error i get System.Data.OleDb.OleDbException: Syntax error in INSERT INTO statement. at System.Data.Common.DbDataAdapter.Update(DataRow dataRows, DataTableMapping tableMapping) at...
3
by: bbernieb | last post by:
Hi, All, Is it possible to access a variable inside of a data binding, without the variable being out of scope? (Note: On the DataBinder line, I get an error message that says "Name 'i' is...
2
by: N. Demos | last post by:
I have a user control with code behind of which two instances are created/declared in my aspx page. The aspx page has code behind also, as I need to access methods of the usercontrols on page...
5
by: Gene | last post by:
What can I do if I want to get the result using the sql command? for example, the select command is "select Name from Employee where StaffID=10" How to get the "Name"??? dim Name as string and...
5
by: DC Gringo | last post by:
I am having a problem reading a simple update to the database. Basically I'm testing a small change to the pubs database -- changing the price of the Busy Executive's Database Guide from 19.99 to...
5
by: Martin | last post by:
Hi All, Im looking forward for info whether VB.NET complied application would run in Windows 98 or not ? Does any one have tried to do so ?? Regards, Martin
14
by: Rolf Welskes | last post by:
Hello, I have an ObjectDataSource which has as business-object a simple array of strings. No problem. I have an own (custom) control to which I give the DataSourceId and in the custom-control...
0
by: Winder | last post by:
Computer Data Recovery Help 24/7 Data recovering tools and services is our focus. We will recover your data in a cost effective and efficient manner. We recover all operating systems and media....
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.