Grace Posted July 21, 2020 Share Posted July 21, 2020 Date is created as an INT type in the table. How can I convert it to a Date format (dd-mm-yyyy) in my select statement? It gives an error message "conversion failed when converting date and/or time from character string". Link to comment Share on other sites More sharing options...
niche Posted July 22, 2020 Share Posted July 22, 2020 is your INT unix timestamp? Link to comment Share on other sites More sharing options...
Makwana Prahlad Posted July 24, 2020 Share Posted July 24, 2020 To change the data type of a column in a table, use the following syntax: SQL Server / MS Access: ALTER TABLE table_name ALTER COLUMN column_name datatype; My SQL / Oracle (prior version 10G): ALTER TABLE table_name MODIFY COLUMN column_name datatype; For More information follow this link https://www.w3schools.com/sql/sql_alter.asp Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now