Site
Home / Forum / Developers / Is there an easy way to change date format for results?

Is there an easy way to change date format for results?


Posted: 04 Jan 2020 01:14

martina4462
Posts: 10
Joined: Jan 2020

Hi, hoping to change date format (from 'dateEvent') easily and quickly - is there a simple way of doing this without having to add much code?

just want to change US style to Euro style for results display on url , i.e. to 'D/M/Y

Posted: 04 Jan 2020 13:15

zag
Posts: 1,558
Joined: Oct 2016

Not via the API but for example in PHP it would be a one liner to format a date.

Posted: 05 Jan 2020 02:17

martina4462
Posts: 10
Joined: Jan 2020

no worries, I've seen now there's a
 'strDate'
section in the API for each sports match - which happens to be in UK date format, easy

Posted: 08 Jan 2020 04:31

martina4462
Posts: 10
Joined: Jan 2020

another thing, do football FA cup game dates take extra time in coming to the API - for ex. my website shows date as 'None, None'

here's a link (bottom right of page, Desktop site only)

thanks, if anyone looks

https://madmartin.pythonanywhere.com/


Posted: 08 Jan 2020 09:25

zag
Posts: 1,558
Joined: Oct 2016



Thats a good question! I'm not actually sure. I think we show the status of games in terms of the progress so it should work. Thew string for extra time should in theory be "ET" but its hard to tell without checking during a live match.


Who is Online?

In total there are 68 users online :: 3 registered, 0 hidden and 65 guests (based on users active over the past 5 minutes) Most users ever online was 424 on Fri Nov 10, 2017 9:02 pm

About Us

Discussion forum for TheSportsDB.com site and related topics

Rules

- Be Polite
- Respect other users
- Always post log files with issues
- Try to be helpful
- No Piracy discussion

Showing 0 to 5 (Total: 5)