by: Manish Jain |
last post by:
Platform : ASP.Net/C#
void SomeFunction(DateTime date)
{
string text = date.ToString(); //This crashes if date is null
}
I am using a construct similar to above. I want to check if the date...
|
by: Paulb1us |
last post by:
I want to set a DateTime field to Null before passing it to the DB
//First I check to see if anything is in this datarow column, because
sometimes we have no data.
DateTime dt;
if (...
|
by: Fred Nelson |
last post by:
Hi:
Another C# newby question:
How do I declare a null DateTime variable:
DateTime myDate = null;
I get the error:
|
by: Curious |
last post by:
Hi,
I have a class that has some fields. One of the fields is of type
DateTime. From the constructor of the class, I am passing
DateTime.Now; The value being stored is the following:...
|
by: craigkenisston |
last post by:
I have a generic function that receives a couple of datetime values to
work with. They can or cannot have a value, therefore I wanted to use
null. This function will call a database stored...
|
by: Bob Day |
last post by:
using VS 2003, VB.net...
Why is this valid:
dim x as datetime = nothing
but this is invalid:
public sub DoSomething (Optional byval x as datetime = nothing)
....code to do something
end...
|
by: Solution Seeker |
last post by:
Hi,
I need a solution to assign a Null to a Datetime Variable / Object.
Am willing to know whether it is possible?
I will appreciate you if any one knows the solution for it .
The...
|
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...
|
by: Brad Pears |
last post by:
I am using vb.net 2005 and SQL server 2000. In my table I have a date field
of type "smalldatetime". In my vb application, the user may or may not enter
a date value into the appropriate text box....
|
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,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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$) {
}
...
|
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...
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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: 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...
|
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...
|