Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

db2 cast timestamp to date

Status
Not open for further replies.

faithful1

Programmer
Sep 27, 2002
49
US
How can I cast a timestamp to a date and group by that date. Currently I am using cast(fieldname as date), but I get duplicate dates when I group by that field.
 
Hello Faithfull,

How does the DATE function work for you? (Should extract the date part from the timestamp) T. Blom
Information analist
Shimano Europe
tbl@shimano-eu.com
 
Thanks, I was using the Date function but then grouping by the original field! That's where the problem was. Thanks for the response.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top