Usharani has Published 80 Articles

What MySQL returns on using any other character than ‘T’ or ‘Space’ between date and time parts?

usharani

usharani

Updated on 29-Jan-2020 06:48:45

38 Views

In that case, MySQL will return all zeros at the place of time along with correct date part. An example is as follows in which we used character ‘W’ at the place of ‘T’ or ‘Space’ between date and time part −mysql> Select TIMESTAMP('2017-10-20W06:10:36'); +----------------------------------+ | TIMESTAMP('2017-10-20W06:10:36') | +----------------------------------+ | ... Read More

How can we provide a date with only year (zero months & zero days) value in MySQL?

usharani

usharani

Updated on 28-Jan-2020 12:25:52

149 Views

We can store a date with only year value and have zero months as well as zero-days in MySQL table by disabling NO_ZERO_IN_DATE mode. If this mode is enabled then MySQL will count such kind of date as invalid date and stores all zeros.mysql> Insert into year_testing (OrderDate) values('2017:00:00'); Query ... Read More

How to calculate age in years from birthdate in MySQL?

usharani

usharani

Updated on 28-Jan-2020 10:08:56

215 Views

We can calculate age in years from birthdate as follows −mysql> SET @dob = '1984-01-17'; Query OK, 0 rows affected (0.00 sec)This above query will pass the value’1984-01-17’ in the ‘dob’ variable. Then after applying the formula in the query below, we can get the age in years.mysql> Select Date_format( ... Read More

How to use case-insensitive switch-case in JavaScript?

usharani

usharani

Updated on 03-Jan-2020 06:20:08

1K+ Views

To use case-insensitive switch-case in JavaScript, make the input all upper or all lowercase.ExampleYou can try to run the following code to learn how to use a case-insensitive switch:           JavaScript Strings                      var ... Read More

How do I get the current date in JavaScript?

usharani

usharani

Updated on 02-Jan-2020 08:39:53

1K+ Views

To get the current date in JavaScript, use the getDate() method.ExampleYou can try to run the following code get the date:           Today's Date       Get Date                         function myFunction() {              var date = new Date();              var n = date.getDate();              document.getElementById("test").innerHTML = n;           }            

In ABAP, How to select all the data into my internal table using loops?

usharani

usharani

Updated on 10-Dec-2019 08:35:38

211 Views

There are different ways that you can use to check the performance of your program. As per my understanding, you can join all tables like this:SELECT t11~orgeh t11~msty t11~mshort t12~position t13~job t14~job_grade t14~scheme    INTO gt_my_combined_table    FROM zgerpt_rnk_min as t11    JOIN hrp1001 as t12    ON t11~orgeh = ... Read More

What is the usage of yield keyword in JavaScript?

usharani

usharani

Updated on 03-Oct-2019 07:08:09

127 Views

The yield keyword is used in JavaScript to pause and resume a generator function. The value of the expression is returned to the generator's caller.Here’s the syntax, where “exp” is the expression and the optional value is returned by “val”, which is passed to the generator's next() method.[val] = yield ... Read More

How to call a Java function inside JavaScript Function?

usharani

usharani

Updated on 03-Oct-2019 06:37:34

5K+ Views

JavaScript cannot call java method directly since it is on the server. You need a Java framework like JSP to call when a request is received from JavaScript. Let’s see how to use JSP to call a Java function inside JavaScript function.Here’s the JavaScript code://javascript code function initiateFunc() {   ... Read More

What Are Whitespace and Line Breaks in JavaScript?

usharani

usharani

Updated on 12-Sep-2019 08:07:03

1K+ Views

JavaScript ignores spaces, tabs, and newlines that appear in JavaScript programs. You can use spaces, tabs, and newlines freely in your program and you are free to format and indent your programs in a neat and consistent way that makes the code easy to read and understand.JavaScript ignores whitespaces. For ... Read More

JavaScript closures vs. anonymous functions

usharani

usharani

Updated on 12-Sep-2019 07:51:45

400 Views

Anonymous FunctionsAnonymous, as the name suggests, allows creating a function without any names identifier. It can be used as an argument to other functions. They are called using the variable name:This is how JavaScript anonymous functions can be used:var func = function() {    alert(‘This is anonymous'); } func();Another example ... Read More

Advertisements