To add minutes to a datetime you can use DATE_ADD() function from MySQL. In PHP, you can use strtotime().To add 30 minutes in MySQL, the DATE_ADD() function is as follows −select date_add(yourColumnName, interval 30 minute) from yourTableName;To use the above syntax, let us create a table. The following is the query to create a table.mysql> create table Add30MinutesDemo −> ( −> YourTime datetime −> ); Query OK, 0 rows affected (0.67 sec)Insert records in the table with the help of following query −mysql> insert into Add30MinutesDemo values(now()); Query OK, 1 row ... Read More
To 1 day to a date in swift we need to create a date first. Once that date is created we have to add specific days to it. In this example we’ll see how we can achieve the same.Let’s create a date first, let it be today, let today = Date()Now to modify this date we’ll use the add function with negative value, let modifiedDate = Calendar.current.date(byAdding: .day, value: 1, to: today)!Now to see the difference between both the dates, let’s add print statement for both of these. Our complete code should now look like this.let today = Date() print(today) ... Read More
To get the output MySQL query result in CSV format, use concat_ws(). The syntax is as follows −SELECT CONCAT_WS(‘, ’, yourColumnName1, yourColumnName2, yourColumnName3, ....N) as anyVariableName from yourTableName;To understand the above syntax, let us create a table. The query to create a table is as follows −mysql> create table CSVFormatOutputs -> ( -> StudentId int not null auto_increment, -> StudentName varchar(20), -> StudentAge int, -> PRIMARY KEY(StudentId) -> ); Query OK, 0 rows affected (1.15 sec)Insert some records in the table using insert command. The query is as follows −mysql> insert into CSVFormatOutputs(StudentName, StudentAge) ... Read More
We have laptops, desktops and what not ... But if we can access our business communications on our iPhone nothing like that ...If you are all in on Apple's mobile platform and use an iPad or iPhone, there are some apps that can help you to streamline your business.EmailNote TakingContact ManagementTo-do'sCalendarSave for laterExpense managementAccountingProductivityCloud Storage
As you know the DECIMAL() method takes two parameter. The first parameter tells about the total number of digits and second parameter tells about number of digits after decimal point. Therefore, if you use DECIMAL(10, 10) that means you can use only 10 fractional digit.For Example: Store 0.9999999999 with DECIMAL(20, 10).To understand what we discussed above, let us create a table. The query to create a table is as follows:mysql> create table Decimal_Demo -> ( -> Id int NOT NULL AUTO_INCREMENT, -> Price DECIMAL(20, 10), -> PRIMARY KEY(Id) ... Read More
DecimalFormat is a concrete subclass of NumberFormat that formats decimal numbers. Let us set DecimalFormat("0.######E0") and use the format() method as well −new DecimalFormat("0.######E0").format(298757)Since, we have used DecimalFormat class in Java, therefore importing the following package in a must −import java.text.DecimalFormat;The following is the complete example −Example Live Demoimport java.text.DecimalFormat; public class Demo { public static void main(String[] argv) throws Exception { System.out.println(new DecimalFormat("0.######E0").format(298757)); System.out.println(new DecimalFormat("0.######E0").format(19988)); } }Output2.98757E5 1.9988E4
The toString() method gives string representation to a Long. Let’s say we have the following Long object −Long longObj = new Long(70); System.out.println("Long: " + longObj);To convert it to String, the toString() method is used −String myStr = longObj.toString();The following is the complete example −Example Live Demopublic class Demo { public static void main(String[] args) { // Long Long longObj = new Long(70); System.out.println("Long: " + longObj); // conversion String myStr = longObj.toString(); System.out.println("Converted to String: " + myStr); } }OutputLong: 70 Converted to String: 70
You can use IN statement to delete more than one rows from a table using id in MySQL. The syntax is as follows −delete from yourTableName where yourColumnName in(value1, value2, .....valueN);To understand the above syntax, let us create a table. The following is the query to create a table.mysql> create table DeleteManyRows −> ( −> Id int, −> Name varchar(200), −> Age int −> ); Query OK, 0 rows affected (3.35 sec)Insert some records in the table with the help of insert command. The query is as follows −mysql> insert into DeleteManyRows values(1, 'John', 23); ... Read More
You can create a parameter using IN and OUT. IN is used to take input parameter and OUT can be used for output.The syntax is as followsDELIMITER // CREATE PROCEDURE yourProcedureName(IN yourParameterName dataType, OUT yourParameterName dataType ) BEGIN yourStatement1; yourStatement2; . . N END; // DELIMITER ;First, we will create a table. The query to create a table is as followsmysql> create table SumOfAll -> ( -> Amount int -> ); Query OK, 0 rows affected (0.78 sec)Insert some records in the table using insert command. The query ... Read More
Although India does not yet have a good setup for Biotechnology, there are career options galore after you have completed your post graduate in biotech. Whether you have completed your post-graduation in Biotech from the reputed institutes in India such as, Tata Institute of Fundamental Research or Indian Institute of Science, or from any university situated abroad, it’s a high-level training that matters.According to industry experts like Dr. Yusuf Deeni, post completion of Masters in Biotechnology, one can find employment in biotech companies or can even pursue Ph.D.One can also be a part of biofuels, healthcare, cleantech and industrial biotechnology.For ... Read More