<%@page contentType="text/html" import="java.util.*" %>
<!--
http://www.roseindia.net/jsp
-->
<html>
<body>
<p> </p>
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing
="0" width="460" bgcolor="#EEFFCA">
<tr>
<td width="100%"><font size="6" color
="#008000"> Date Example</font></td>
</tr>
<tr>
<td width="100%"><b> Current Date
and time is: <font color="#FF0000">
<%= new java.util.Date() %>
</font></b></td>
</tr>
</table>
</center>
</div>
</body>
</html>
The heart of this example is Date() function of the java.util package which returns the current data and time.
In the JSP Declaratives
<%@page contentType="text/html" import="java.util.*" %>
we are importing the java.util package and following JSP Expression code
<%= new java.util.Date() %>
Popular Posts
-
Now I will show you how to retrieve the data posted from a HTML file in a JSP page. Consider an html page that prompts the user to enter his...
-
The SQL SUM aggregate function allows selecting the total for a numeric column. The SQL SUM syntax is displayed below: SELECT SUM(Column1) F...
-
The SQL HAVING clause is used to restrict conditionally the output of a SQL statement, by a SQL aggregate function used in your SELECT list ...
-
The SQL COUNT aggregate function is used to count the number of rows in a database table. The SQL COUNT syntax is simple and looks like this...
-
The SQL MAX aggregate function allows us to select the highest (maximum) value for a certain column. The SQL MAX function syntax is very sim...
-
The SQL IN clause allows you to specify discrete values in your SQL WHERE search criteria. THE SQL IN syntax looks like this: SELECT Column1...
-
We will use the Customers table to illustrate the SQL LIKE clause usage: FirstName LastName Email DOB Phone John Smith John.Smith@yaho...
-
The SQL UPDATE general syntax looks like this: UPDATE Table1 SET Column1 = Value1, Column2 = Value2 WHERE Some_Column = Some_Value The SQL U...
-
SQL Hosting is a web hosting plan featuring one or more SQL databases. Having SQL database backend is essential for most of the modern websi...
-
SQL Tutorial Table of Contents SQL Tutorial Learn what SQL (Structured Query Language) is, and where and how it is used. SQL Table SQL Datab...
I certainly agree to some points that you have discussed on this post. I appreciate that you have shared some reliable tips on this review.
ReplyDeleteI certainly agree to some points that you have discussed on this post. I appreciate that you have
ReplyDeleteshared some reliable tips on this review.
Awesome work.Just wanted to drop a comment and say I am new to your blog and really like what I am reading.Thanks for the share
ReplyDelete