i'm supposed to version the records in a database by year. so if i get a new file from the year 2023 the entries should be changed according to the year. i'm not finding anything useful to versioning data. in most cases, they use timestamps.but i'm not supposed to version the data by a specific timestemp but by the year the data is from. the data can be changed each year and according to the year the records should be modified.
i'm working on java with jpa, spring boot, spring web, h2 database and spring batch
Below option may be useful.
When you save the timestamp, then whenever required you can fetch and extract year part from the timestamp, ignore other components of the timestamp (day, month, time) and use it in comparison against year.
You can add additional customized column to store year.
Related
I am working on a school management system
I want to store time table based on day, class, section, subjects, teacher and time.
I am confused about how to design table and how to store data.
time table image
It seems you are new in this community. Your question does not provide proper information. Guessing you are trying to create a table named 'time' with attributes day, class, section, subjects, teacher and time.
In phpmyadmin you can do this easily by create table option. In case of laravel you need to create migrations and use 'php artisan migrate' command. you can follow below link for further clarification- https://laravel.com/docs/7.x/migrations
As I read in this link "Report viewers can't modify data source parameters directly. However, if you've enabled date parameters for a BigQuery data source, and your report includes a date range control, viewers can use that control to request different starting and ending dates from the BigQuery data."
I'm facing a situation where I need to filter two periods at the same time and over the same data source:
Period where users installed my app.
Period where users made actions.
For now, Data Studio permits only one date parameter in customized queries for BigQuery (DS_START_DATE, DS_END_DATE). But what if I need an additional date parameter? Is there a solution to this need?
Include all the data from BigQuery to Data Studio first, then set custom date range for the specific charts/tables.
data source = dateTime 2016-02-26 00:00:00.0
dss return = dateTime 2016-02-25T09:00:00.000-03:00
I would like to know if there is any settings to be made in the tool itself.
Let me briefly explain what you have received from the WSO2 Data Services Server (DSS).
It's not subtracting some hours from the date stored in your database. Actually, DSS server appends time zone information to your date fields.
Do you really want your date fields without time zone information? At the moment, I would like to suggest (as a workaround ) manually remove time zone information once you receive the response from the DSS server.
In the meantime, I have raised a public JIRA [1] regarding this issue and will notify the progress of it via this question.
Thanks,
Upul
[1]. https://wso2.org/jira/browse/DS-1191
I'm trying to understand why dates stored in my MSSQL server are being altered back one hour when I view them in JSON format.
Here is the Datetime date stored in MSSQL
2015-08-12 00:00:00.000
Here is debug mode in Visual Studio showing that the date "appears" to be retrieved correctly from the database.
{8/12/2015 12:00:00 AM}
And here is the JSON output - the date is one hour earlier! I see that the json timezone is -6, and the database timezone doesn't appear to have that, but I don't have any special settings in my web api config. I'm really not understanding what is going on here. Appreciate any help.
"2015-08-11T23:00:00-06:00",
Edit: My pictures didn't show up so I edited to show the dates in text format - hope that is allright.
When moving to OData V4 (from earlier versions) one of the first 'hickups' we run into is that V4 does not support 'DateTime' but 'DateTimeOffset'. In .Net terms we're moving from a "Date assumed to be in locale timezone of the server running it" to "DateTimeOffset" which explicitly included the timezone information itself.
OWin will emit the DateTimeOffset based on your thread's culture info. Your solution will then lie in making sure when converting between "DateTime" and "DateTimeOffset" (DB/EF and OWin respectively) that you don't rely on your local thread's locale setting, but force it to be considered UTC.
I am facing a problem for past two days with regard to the date format in SQL.
I have developed a application in ASP.NET and have deployed it in production server. I am persisting data into a table which has an xml column with date feilds like
---some date time---
When I run the application from localhost ( or deploy the application in my computer) the date is persisted in in 24 hours time format
For eg :15/08/2009 14:30:00
and when I run the same application deployed in the production server the data is persisted in 12 hours time format
For eg: 15/08/2009 2:30:00 PM
Note: I am not specifying any format in the application code when persisting data.
The following is what I have tried :
Checked regional settings of my computer and the webserver and format is the same (h:mm:ss tt)
Have checked the culture info of both my computer and webserver and it is the same. (en-AU)
In my computer's IIS Properties I have set the same culture of the webserver by Editing the configuration.
The dates in date columns of the same table are stored in consisntent format (24 hr format) when persisted from both my computer and the production webserver.
For eg: 2009-10-28 14:00:49.000
Still the date time is stored in different formats. I am unable to figure out from where the application is taking the format when persisting.
I finally found the root cause for this problem. I would like to post it just in case someone faces this same problem this might help them.
Go to regedit. Select Controlpanel -> international -> sTimeFormat and verify the time format given.
In my computer, the time format is HH:mm:ss and in server it is hh:mm:ss tt that was the main problem. I have changed the format in server to HH:mm:ss and it works perfect :)
Please refer to this link for details.
Try add the following to the web.config of your website:
<system.web>
<globalization culture="en-ZA" uiCulture="en-ZA"/>
</system.web>
Replace "en-ZA" with the specific culture you require. The will ensure that the browsers culture settings will not be used.