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

How to get a datetime for Dataview

ad
I have a DataView, say myDV, it contain a DataTime field, "Birth".
I want to get the Birth Value from the DataView:

DateTiem dBirth= (DateTime)myDV["Birth"];

But the complier throw an error.

How can I get datetime for Dataview?
Nov 17 '05 #1
3 1800
"ad" <ad@wfes.tcc.edu.tw> wrote in message
news:uQ**************@TK2MSFTNGP09.phx.gbl...
I have a DataView, say myDV, it contain a DataTime field, "Birth".
I want to get the Birth Value from the DataView:

DateTiem dBirth= (DateTime)myDV["Birth"];


Try spelling "DateTime" correctly...
Nov 17 '05 #2
In addition to spelling 'DateTime' correctly in the declaration, you didn't
specify which row in the dataview you want. You have to index into it by
row, then by column. Otherwise if you have 10 rows, which 'Birth' value do
you expect to get?

"ad" <ad@wfes.tcc.edu.tw> wrote in message
news:uQ**************@TK2MSFTNGP09.phx.gbl...
I have a DataView, say myDV, it contain a DataTime field, "Birth".
I want to get the Birth Value from the DataView:

DateTiem dBirth= (DateTime)myDV["Birth"];

But the complier throw an error.

How can I get datetime for Dataview?

Nov 17 '05 #3
I wish I were more like Mark and never had a typo!

"Mark Rae" wrote:
"ad" <ad@wfes.tcc.edu.tw> wrote in message
news:uQ**************@TK2MSFTNGP09.phx.gbl...
I have a DataView, say myDV, it contain a DataTime field, "Birth".
I want to get the Birth Value from the DataView:

DateTiem dBirth= (DateTime)myDV["Birth"];


Try spelling "DateTime" correctly...

Nov 17 '05 #4

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

Similar topics

1
by: aaa | last post by:
Hi I am trying to bind Text property of label control to datetime object (attribute from typed dataset). The problem is that I want only to show date part. Currently I use following code: ...
0
by: keith | last post by:
In our app, datagrid bound to a dataview that has datetime columns. when sort on the datatime columns (since they are datetime type), date were not sorted property for datetime type. Can you...
1
by: Jarod | last post by:
Hey I have dtMessages dataTable and there is columnt DateTime, how can I compare dates using DataView ? I need to compare hours more than dates. But the dates are also needed because sometimes...
2
by: Alpha | last post by:
I have a window application. In one of the form, a datagrid has a dataview as its datasource. Initial filtering result would give the datavew 3 items. When I double click on the datagrid to edit...
0
by: Harry Haller | last post by:
The context is shown below in the getGames() method. I get errors on these lines: dtGames.Rows = (TimeSpan)dtGames.Rows; dtGames.Rows = (DayOfWeek)dtGames.Rows; because the playDate column...
5
by: David Wender | last post by:
I want to create a dataview with a sort on multiple columns. However, when I use FindRows, I only want to search some of the columns, not all. Is this possible? I have not been able to make it...
0
by: Ripendra007 | last post by:
hi all, i want to filter the date which is in label1.text like dview.RowFilter = "dir_bdate = '"+label1.Text+" '" ; here dir_bdate is my DateTime field of database and label1 contains string in...
11
by: Matt F | last post by:
I'm trying to do something that seems like it should be pretty simple, but haven't found a solution. I am trying to add a datacolumn to a datatable that adds or subtracts a number of days based on...
2
by: Duggi | last post by:
Hi I have a dataview dv, in which one of the column is a date time column. I would like to apply filter on this column. The filter should be some thing like "All the rows that has the date...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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...

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.