DB Date Format
Moderator: Thorsten
-
- Posts: 14
- Joined: Tue Mar 08, 2016 10:49 am
DB Date Format
What is the date format stored as in the database?
How can I convert it to a readable format with a SQL query?
How can I convert it to a readable format with a SQL query?
Re: DB Date Format
Hi Terry,
depends in the table. For which table do you need the information?
bye
Thorsten
depends in the table. For which table do you need the information?
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
-
- Posts: 14
- Joined: Tue Mar 08, 2016 10:49 am
Re: DB Date Format
member_since in faquser.
Re: DB Date Format
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
-
- Posts: 14
- Joined: Tue Mar 08, 2016 10:49 am
Re: DB Date Format
Ho could I retrieve that formatted in a dd/mm/yyyy format with a SQL statement?
Re: DB Date Format
Hi,
that's hard, it's old crappy code I wrote long ago. Do you need it as SQL or would it be possible to use PHP, too?
bye
Thorsten
that's hard, it's old crappy code I wrote long ago. Do you need it as SQL or would it be possible to use PHP, too?
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
-
- Posts: 14
- Joined: Tue Mar 08, 2016 10:49 am
Re: DB Date Format
Really need a SQL query, not able to use PHP as we are connecting to the DB from a ODBC connection within a spreadsheet.
-
- Posts: 14
- Joined: Tue Mar 08, 2016 10:49 am
Re: DB Date Format
Thorsten, any joy producing a query for us?
Re: DB Date Format
Hi,
I did not forgot you, I'm quite busy preparing 2.8.28 and 2.9.0 final. Will work on your query after this. Sorry for the delay.
Refactoring of the date formats will be a target for 2.10 and 3.0.
bye
Thorsten
I did not forgot you, I'm quite busy preparing 2.8.28 and 2.9.0 final. Will work on your query after this. Sorry for the delay.
Refactoring of the date formats will be a target for 2.10 and 3.0.
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
Re: DB Date Format
Hi,
here it is:
bye
Thorsten
here it is:
Code: Select all
SELECT
user_id,
CONCAT(SUBSTRING(member_since, 7, 2), '/', SUBSTRING(member_since, 5, 2), '/', SUBSTRING(member_since, 1, 4))
FROM
faquser
WHERE
user_id = 1;
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist