Search This Blog

About Me

Highly experienced in implementation and customization of Alfresco. More than 11 years of experience working on Alfresco, versions ranging from 2.x to 5.x. Successfully processed innovative and tailored CMS solutions to meet ever-changing business requirements for multiple clients. Role Includes : Experience in Alfresco Upgrades, SOLR migration, Proposals, Team Handling, Delivery, Content Migration, POC's etc.. Extensive experience in client co ordination, working on offshore-onshore model and project take over. Technical Expertise Includes : Java, JSP, Servlet, JSF, JavaScript, AJAX, Spring, SQL, Hibernate, Web Services(REST). Specialities Includes : Content Migration, Product Customization, Business CMS Solutions, Workflow, Project Transition.

Wednesday, July 1, 2009

Calculate Day from provided date in Java

Hi,

This blog explains you to calculate the Day of the week when the date is provided

Here is the java code

String date = "06302009";
SimpleDateFormat sdf = new SimpleDateFormat( "MMddyyyy" );
Date d = sdf.parse(date);
Date d2;
System.out.println("D is - "+d.getDay());

This will give you the day value on 30th of July 2009
(0- Sunday, 1- Monday, 2- Tuesday, 3- Wednesday, 4- Thursday, 5- Friday, 6- Saturday)