| |

VerySource

 Forgot password?
 Register
Search
View: 703|Reply: 5

How to convert from java.sql.Date to java.util.Date? ? ? ?

[Copy link]

1

Threads

3

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

Post time: 2020-1-30 00:40:01
| Show all posts |Read mode
Waiting online! : How to convert from java.sql.Date to java.util.Date? ? ? ?
Reply

Use magic Report

0

Threads

2

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 France

Post time: 2020-3-5 10:45:01
| Show all posts
Attention ... have troubled this problem for a while ...
Reply

Use magic Report

1

Threads

3

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

 Author| Post time: 2020-3-5 14:15:01
| Show all posts
Find a solution that looks ok:
 java.sql.Date date = new java.sql.Date (new Date (). getTime ());
Reply

Use magic Report

0

Threads

5

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

Post time: 2020-3-5 15:30:02
| Show all posts
No need to go, java.sql.Date is a java.util.Date subclass
Reply

Use magic Report

0

Threads

2

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-3-5 17:30:01
| Show all posts
Extend it ... not a subclass?
Reply

Use magic Report

1

Threads

3

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

 Author| Post time: 2020-3-6 10:00:01
| Show all posts
Now you can convert to its parent type java.util.Date
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list