473,386 Members | 1,830 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,386 software developers and data experts.

Date vs. DateTime

cj
Converting a vb2003 program to vb2005 and making some changes I just
noticed in 2005 DateTime was not showing as an option when I type

dim starttime as

Then I noticed it's in the all listing not the common. Then I notice
Date and DateTime give the same blurb about saving date and time. So
what's the difference between them?

FYI I do plenty of Visual Foxpro and VB2003 work as well so I frequently
get my wires crossed between what you to do in which language.
Mar 15 '07 #1
2 19475
"cj" <cj@nospam.nospamschrieb:
Converting a vb2003 program to vb2005 and making some changes I just
noticed in 2005 DateTime was not showing as an option when I type

dim starttime as

Then I noticed it's in the all listing not the common. Then I notice Date
and DateTime give the same blurb about saving date and time. So what's
the difference between them?

'Date' is a VB keyword that is an alias for 'System.DateTime', like
'Integer' is an alias for 'System.Int32'.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Mar 15 '07 #2
cj
aaaah, ok. Thanks.

Herfried K. Wagner [MVP] wrote:
"cj" <cj@nospam.nospamschrieb:
>Converting a vb2003 program to vb2005 and making some changes I just
noticed in 2005 DateTime was not showing as an option when I type

dim starttime as

Then I noticed it's in the all listing not the common. Then I notice
Date and DateTime give the same blurb about saving date and time. So
what's the difference between them?


'Date' is a VB keyword that is an alias for 'System.DateTime', like
'Integer' is an alias for 'System.Int32'.
Mar 15 '07 #3

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

Similar topics

16
by: Donnal Walter | last post by:
I was very surprised to discover that >>> import datetime >>> x = datetime.date(2004, 9, 14) >>> y = datetime.datetime(2004, 9, 14, 6, 43, 15) >>> print x == y True How can these two...
3
by: Harald Hanche-Olsen | last post by:
I'm confused. I was going to try linkchecker, and it dies with a traceback ending in File "/usr/local/lib/python2.4/calendar.py", line 32, in _localized_month _months = AttributeError:...
1
by: ESPNSTI | last post by:
Hi, I'd like to be able to distinguish between a DateTime variable that is allowed to hold both date and time and a DateTime variable that is allowed to only hold a Date. The reason's for this...
6
by: Ante Perkovic | last post by:
Hi, How to declare datetime object and set it to my birthday, first or last day of this month or any other date. I can't find any examples in VS.NET help! BTW, what is the difference...
5
by: ns21 | last post by:
Our application is windows desktop application. We are using VS.Net 2003, C#, Framework 1.1, SQL 2000. We use webservices to add/update/select objects. We are using XML Serialization. Following is...
17
by: Terry Jolly | last post by:
New to C# ---- How do I convert a Date to int? In VB6: Dim lDate as long lDate = CLng(Date) In C#
10
by: Henrik Dahl | last post by:
Hello! I have an xml schema which has a date typed attribute. I have used xsd.exe to create a class library for XmlSerializer. The result of XmlSerializer.Serialize(...) should be passed as the...
2
by: Andrus | last post by:
I need to display and edit only date part in DataGridView column whose data source type is DateTime?. The following code shows and allows to edit also time part. How to modify this code so that...
2
by: Charli Wilson | last post by:
Hello! A rather complicated sql query that I might be makign much more difficult that it should be: I have two tables: News: newsid, datetime, newstext Picture: pictureid, datetime, imgPath...
2
by: Kenny Ken | last post by:
Guys, I really need your help on this one. I have a list of articles using smarty I want to organize by date, Date1 ArticleA Date2 ArticleB ArticleC
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.