Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Elinor add convert DateSql to date #6

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/time/Timestamp.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,17 @@ public static Date getTimeNow() {
return datedate;
}

public static String convert(Date indputDate) throws ParseException {
public static String convert(Date indputDate) {
SimpleDateFormat datFormat = new SimpleDateFormat("d MMM yyyy HH:mm:ss, z"); // formatet datoen skal vises i
stringdate = datFormat.format(indputDate);// convetere et date obj til en string i angivet format(datFormat obj's format)
return stringdate;


}
public static String convertDateSql(java.sql.Timestamp dateSql ){
Date datedate = new Date(dateSql.getTime());//
return convert(datedate);

}

}
Binary file modified vpproject/JEP_2S.vpp
Binary file not shown.
Binary file renamed vpproject/JEP_2S.vpp~1 → vpproject/JEP_2S.vpp~2
Binary file not shown.
Binary file added vpproject/JEP_2S.vpp~3
Binary file not shown.
5 changes: 5 additions & 0 deletions vpproject/diagrams/Class Diagram1.vpclassd
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#Visual Paradigm: DO NOT MODIFY THIS FILE!
#Sat May 23 19:06:01 CEST 2015
Create=false
DiagramId=qHC9gbKGAqACPwYb
ProjectId=j9aKOrKGAqACPwOT