Results 1 to 4 of 4
Thread: Date
- 02-04-2012, 03:38 PM #1
Member
- Join Date
- Feb 2012
- Location
- Norway
- Posts
- 96
- Rep Power
- 0
- 02-04-2012, 04:02 PM #2
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,427
- Blog Entries
- 7
- Rep Power
- 17
Re: Date
Your second line doesn't make any sense; read the API documentation for the DateFormat and SimpleDateFormat classes.
kind regards,
JosWhen people rob a bank they get a penalty; when banks rob people they get a bonus.
- 02-05-2012, 06:46 PM #3
Member
- Join Date
- Feb 2012
- Location
- Norway
- Posts
- 96
- Rep Power
- 0
Re: Date
I am not sure how this format is....
Here is the hole file:
Java Code:package Logikk.Business; import java.sql.Date; /** * * @author terje */ public class LedgerTrans { private int transID; private Date transDate; private String transText; private int account; private double debet; private double credit; public LedgerTrans() { transID = 0; transDate = dd.mm.yyyy; transText = ""; account = 0; debet = 0; credit = 0; } public LedgerTrans(int number, String text, Date dato, int id, double debit, double kredit) { this.transID = id; this.account = number; this.transDate = dato; this.transText = text; this.debet = debit; this.credit = kredit; } public int getid() { return transID; } public void setid(int id) { this.transID = id; } public int getaccount() { return account; } public void setaccount(int number) { this.account = number; } public String gettranstext() { return transText; } public void settranstext(String text) { this.transText = text; } public Double getdebet() { return debet; } public void setdebet(Double debit) { this.debet = debit; } public Double getcredit() { return credit; } public void setcredit(Double kredit) { this.credit = kredit; } public Date getdate() { return transDate; } public void setdate(Date dato) { this.transDate = dato; } }
-
Re: Date
Again, this:
makes absolutely no sense whatsoever. You may wish to write a paragraph or two explaining what you're trying to do with this code and in particular this line of code. Also, why are you using java.sql.Date and not java.util.Date?Java Code:transDate = dd.mm.yyyy;
Similar Threads
-
Inserting current date to oracle Date data type
By bartolay13 in forum JDBCReplies: 5Last Post: 02-16-2012, 09:26 AM -
How can I know last access date & creation date for a file in java?
By Rami in forum Advanced JavaReplies: 4Last Post: 07-27-2011, 11:57 AM -
Is their any method which converts a Julian date to an actual date.
By renu in forum New To JavaReplies: 2Last Post: 05-12-2011, 04:52 PM -
Compare date input to database with current date
By hungleon88 in forum Advanced JavaReplies: 2Last Post: 11-25-2008, 08:10 AM -
Creating a Gregorian Calendar using a Date object gives date - 1
By prachi_goliwadekar in forum New To JavaReplies: 1Last Post: 05-08-2008, 08:32 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks