I am using Mysql Database with C#.

problem is i am using datediff() function returns int that value is stored in C# property int variable while assign giving error as cannot covert system.Int64 to System.Int32.
please provide me some idea abut this error.

Recommended Answers

All 3 Replies

Do you want to convert it in sql database or in c# ? if in C# then you are in wrong forum

in C# use this code to convert to int32 Convert.ToInt32(int64valueto_be_converted);

or you could just cast it (int)valueToBeConverted

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.