Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

how to merge data with date and time  RSS feed

 
pooja rathi
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Here i want to do is the data for a,b,c
according to the entered start date and end date
with entered date and time stamp of 2 mins time difference.
Expected output:
Enter start date :
01-01-2000
Enter end date :
05-01-2000

Date Time a b c

01-01-2000 12:00:00 am 230 0.12 0.01
01-01-2000 12:02:00 am 231 0.13 0.02
01-01-2000 12:04:00 am 232 0.14 0.03
till
01-01-2000 11:58:00 am 232 0.14 0.03


now i am getting data value for a,b,c but
not properly date and time along with that.
secondly i want the insert statement should be
equals to total variable.
 
Knute Snortum
Sheriff
Posts: 4073
112
Chrome Eclipse IDE Java Postgres Database VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There seems to be something wrong with these lines (100, 101)

Where do d_f and tf come from? And timestamp is not declared.

Other things: you are not using the generic form of Lists and sometimes you are not using imports. So this line (26)

would be better as
 
pooja rathi
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Knute Snortum wrote:There seems to be something wrong with these lines (100, 101)

Where do d_f and tf come from? And timestamp is not declared.

Other things: you are not using the generic form of Lists and sometimes you are not using imports. So this line (26)

would be better as

d_f anf tf is commented code, tried your options too but not getting desired output i just want to print date and time after device_id not in starting
 
Knute Snortum
Sheriff
Posts: 4073
112
Chrome Eclipse IDE Java Postgres Database VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you have Java 8, the new LocalDateTime will be of use to you.

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!