
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
AmitDiwan has Published 10744 Articles

AmitDiwan
337 Views
To find the difference, use the DATEDIFF() method. Let us first create a table −mysql> create table DemoTable1446 -> ( -> DueDate date -> ); Query OK, 0 rows affected (1.42 sec)Insert some records in the table using insert command −mysql> insert into DemoTable1446 values('2019-01-21'); Query OK, ... Read More

AmitDiwan
734 Views
To set conditions in a stored procedure, use IF...ELSE in MySQL. Following is the syntax for if-else −IF yourCondition then yourStatement1, ELSE yourStatement2, END IF;Let us implement the above syntax in a stored procedure −mysql> DELIMITER // mysql> CREATE PROCEDURE IF_ELSE_DEMO(IN value ... Read More

AmitDiwan
443 Views
To get string as date, use STR_TO_DATE() method. Let us first create a table −mysql> create table DemoTable1445 -> ( -> AdmissionDate varchar(20) -> ); Query OK, 0 rows affected (0.46 sec)Insert some records in the table using insert command −mysql> insert into DemoTable1445 values('01.10.2019'); Query OK, ... Read More

AmitDiwan
167 Views
To get the capacity of a SortedList, the code is as follows −Example Live Demousing System; using System.Collections; public class Demo { public static void Main(String[] args){ SortedList sortedList = new SortedList(); sortedList.Add("A", "1"); sortedList.Add("B", "2"); sortedList.Add("C", "3"); ... Read More

AmitDiwan
250 Views
To check whether the Unicode character is a separator character, the code is as follows −Example Live Demousing System; public class Demo { public static void Main(){ bool res; char val = ', '; Console.WriteLine("Value = "+val); res ... Read More

AmitDiwan
283 Views
To convert the value of the specified Decimal to the equivalent 8-bit unsigned integer, the code is as follows −Example Live Demousing System; public class Demo { public static void Main(){ Decimal val1 = 6.59m; Decimal val2 = 30.12m; Decimal val3 ... Read More

AmitDiwan
174 Views
To get the TypeCode for value type Decimal, the code is as follows −Example Live Demousing System; public class Demo { public static void Main(){ Decimal val = Decimal.MaxValue; Console.WriteLine("Decimal Value = {0}", val); Console.WriteLine("HashCode = {0}", (val.GetHashCode()) ); ... Read More

AmitDiwan
152 Views
To get the hash code for the current Decimal instance, the code is as follows −Example Live Demousing System; public class Demo { public static void Main(){ Decimal val = 135269.38193M; Console.WriteLine("Decimal Value = {0}", val); Console.WriteLine("HashCode = {0}", (val.GetHashCode()) ); ... Read More

AmitDiwan
112 Views
To convert the specified string representation of a logical value to its Boolean equivalent, the code is as follows −Example Live Demousing System; public class Demo { public static void Main(){ bool val; bool flag; val = Boolean.TryParse("true", out flag); ... Read More

AmitDiwan
2K+ Views
To convert the value of the current DateTime object to Coordinated Universal Time (UTC), the code is as follows −Example Live Demousing System; public class Demo { public static void Main() { DateTime d = new DateTime(2019, 12, 11, 7, 11, 25); Console.WriteLine("Date = ... Read More