I was struggling for a while, trying to copy an action in PhotoShop (CS3), it turns out all you need to do is drag it onto the "Create new action" icon and boom!
Another thing that turns out to be quite easy is formatting a date from a string in jsp, in the example below the "published" variable is a string, the pattern attribute on the parseDate tag must match the format of your string, after that you have a date object variable which you can format using the formatDate tag.
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<c:set var="published" value="2012-10-01 12:24:09.263" /> <fmt:parseDate value="${published}" pattern="yyyy-MM-dd HH:mm:ss" var="publishedDate"/> <p>Published: <fmt:formatDate value="${publishedDate}" type="date" dateStyle="full"/> </p>
checkout http://www.tutorialspoint.com/jsp/jstl_format_formatdate_tag.htm for more info on what the type and dateStyle attributes do.
No comments:
Post a Comment