AQuer
April 23, 2024, 1:42pm
1
Hi,
I need to extract day of week from date.
If I use native function, it gets bad result
17/4/24 was wednesday, function returns thursday ("dimarts")
Being used native function:
and calculated field as
what's on? can we change anything?
thanks,
anna
{
"browser-info": {
"language": "ca",
"platform": "Win32",
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36",
"vendor": "Google Inc."
},
"system-info": {
"file.encoding": "UTF-8",
"java.runtime.name": "Java(TM) SE Runtime Environment",
"java.runtime.version": "11.0.13+10-LTS-370",
"java.vendor": "Oracle Corporation",
"java.vendor.url": "https://openjdk.java.net/ ",
"java.version": "11.0.13",
"java.vm.name": "Java HotSpot(TM) 64-Bit Server VM",
"java.vm.version": "11.0.13+10-LTS-370",
"os.name": "Linux",
"os.version": "3.10.0-1160.25.1.el7.x86_64",
"user.language": "en",
"user.timezone": "Europe/Madrid"
},
"metabase-info": {
"databases": [
"postgres",
"oracle"
],
"hosting-env": "unknown",
"application-database": "postgres",
"application-database-details": {
"database": {
"name": "PostgreSQL",
"version": "13.3"
},
"jdbc-driver": {
"name": "PostgreSQL JDBC Driver",
"version": "42.7.2"
}
},
"run-mode": "prod",
"version": {
"date": "2024-04-10",
"tag": "v0.49.4",
"hash": "0fdefcf"
},
"settings": {
"report-timezone": null
}
}
}
TonyC
April 24, 2024, 10:33am
2
If you go to Admin -> Localization Settings .. Can you check the first day of week setting there
e
AQuer
April 24, 2024, 11:29am
3
Hi Tony, thanks a lot for your answer.
I checked that before and didn't work.
that's working days (it should be monday-friday with data, not sunday "diumenge")
this is the configuration I have now
starts on "dilluns" monday AND THE PLOT STARTS ON "Dimarts" THURSDAY!!!
I change that to "diumenge" (sunday)
and the result is that sunday apears on first position, but data is still wrong
it's something more... if you use day of week with your data, you get right results?
Is it wrong when displayed as a table? I had a problem with MS SQL when the first day of the week in SQL was a Sunday rather than a Monday. The table was correct, the chart wrong.
AQuer
April 25, 2024, 7:57am
5
you mean the same question viewed as table? yes, is still wrong
diumenge-->sunday it must be around zero
I have the same Issue, connected to MS SQL.
Date Format is right and start dday also set to monday. In the Raw DB the date is correct and in the visualization the day is 1 day before. We need a solution here, without right date the reports are a mesh. Anybody with an idea?
Luiggi
January 28, 2025, 9:30am
7
Check the reporting timeline. And if there’s still an error there post the screenshots here and version
Reporting timeline is correct, same like the database to Europe/Berlin. SQL Database has UTC+1. Table content is right, the dates are Mo-Fri. But the Graphic show us Saturdays or Sundays. Version of Metabase is: 0.52.8 Thank you for your support