Questions tagged [date-format]
`DateFormat` is a Java Standard Edition library class which provides utility methods to parse and format dates.
2,307
questions
0
votes
0
answers
2
views
Spring MVC REST Date input and timezones
I'm working with Spring MVC and I have a custom date/datetime parser:
@Bean
public FormattingConversionService mvcConversionService() {
DefaultFormattingConversionService conversionService = new ...
0
votes
0
answers
18
views
Convert date format is not working when passing a field in SQL
In my SQL query CONVERT(varchar,getDate(),0) is working => 19 june 2022 10.30AM
But CONVERT(varchar,il.DepartureStation,0) is not working and it gives 2022-09-21 22:20:00.0.
Do I need to convert ...
0
votes
2
answers
53
views
How to remove a string date exist in a list of Strings in dart?
I have a list of strings and one if it's items looks like this '19-06-2022 12:37' ..
How can i remove any pattern like this if it exist in the list using Dart language ?
2
votes
0
answers
21
views
How Can I compare table column by convert it first in postgresql + typeorm
I am beginner in Backend technology and I am developing one query in Typeorm QueryBuilder + PostgreSQL.
My query is look like this :
But I can't convert my timestamp into following format. Can anyone ...
1
vote
0
answers
45
views
Spark SQL date conversion error from timestamp to string when using presto
I am trying to pull data from a table where the dates are in timestamp format 2019-06-31 19:00:00
I want to have them in string format as 20190631
It works if I choose get_pandas_df instead of ...
0
votes
2
answers
39
views
Oracle SQL - group by date_format function
Can someone help me to solve my error please?
I am trying to count distinct values in ID_ACCIDENT column and I want them grouped by months (dates are stored in column DATUM in format YYYY/MM/DD).
A ...
-1
votes
2
answers
23
views
JS Format 201708 into M yy format
I have a string in this format 201708 where the first four numbers are the year and the last two the month's. The result being a date of August 2017.
My first idea was to just make it to an date but ...
0
votes
1
answer
65
views
Java - format Date only with slash based on locale
My code is
ZonedDateTime zoned = ZonedDateTime.now();
DateTimeFormatter pattern = DateTimeFormatter.ofLocalizedDate(FormatStyle.MEDIUM).withLocale(Locale.forLanguageTag("ja-JP"));
System.out....
-1
votes
1
answer
30
views
How to enumerate dates between two dates with moment JS
Currently using the Bootstrap Table library by wenzhixin. I'm trying to find a way to set up a filter that use the data range principle.
This code "https://jsfiddle.net/wenyi/06pg2wms/11/" ...
0
votes
0
answers
34
views
Java parse date from string including -th day of month [duplicate]
On the web site I'm working with the dates object is created are presented in format like:
Jun 8th 2022 16:31:22
I need to validate the creation date is within the last 5 minutes.
So, I can get the ...
0
votes
2
answers
26
views
How to format a UTC string as MMMM dd, yyyy in Javascript for kore.ai
The string I have : 2021-11-02T00:00:00.000Z .
I need to display this as November 02, 2021.
Could someone please help me with this?
0
votes
0
answers
10
views
how to format date to meet where closure format in prisma2
the created_at date is stored as DateTime however on a select only the date is needed.
for example `
var date_entered = '2022-06-26'
var leads = await context.prisma.leads.findMany({
skip: args....
0
votes
1
answer
25
views
Previous screen time is not updating in flutter
I'm using stateless Widget in my application.
By using this single line I can get the output.
DateFormat('HH:mma').format(now).
1.problem is when screen is moving to another screen and back to ...
0
votes
0
answers
35
views
Using the react-calendar package, the date and month numbers get interchanged
I am facing an issue with my web application where on certain systems (Windows 10 & 11 as of now), the react-calendar package that I am using interchanges the date and month numbers, returning an &...
2
votes
2
answers
117
views
How to get localized "One Letter" weekday abbreviations in Dart?
If I do this
DateTime dateTime = DateTime(2022, 5, 1); // Sunday
print(DateFormat("E").format(dateTime));
Sun will be printed out to the console. Which is what I expected.
This also works ...
-2
votes
1
answer
19
views
MySQL convert a column into dat format
The column type is bigint and the values are
20211123
20220125
How can I change it to date:
2021-11-23
2022-01-25
0
votes
0
answers
66
views
Quicksight Incremental refresh not working
I want to do incremental refresh in quicksight for previous days data. Refresh runs without error however no rows are ingested or dropped. I have verified there is data for previous day in the sql ...
0
votes
2
answers
49
views
MYSQL Select Data From Named Day Between Two Dates
I have event data stored in a table with each one having a start and end date. I need to run a select query where an event for a named day is returned based on whether the duration is in a selected ...
1
vote
0
answers
402
views
java.text.ParseException: Unparseable date Wed Mar 29 15:21:00 IST 2022. in android
I am facing an issue whenever I am trying to parse the string. Here is the code
val date_ = "Wed Mar 29 15:21:00 IST 2022"
const val DF_MMM_dd_HH_mm_ss_z_yyyy = "EEE MMM dd HH:mm:ss z ...
0
votes
2
answers
76
views
VUEJS - How to Convert Date from API Response
I'm doing my project with API and the default birthdate from the response is YYYY-MM-DD but I wanna format and show the birthdate in my modal dialog in this format DD-MM-YYYY,
here's the code
axios
....
0
votes
1
answer
40
views
Format date SQL from dd/mm/yy hh:mm to yy-mm-dd
I have a table that's using this format for dates
dd/mm/yy hh:mm
visit_date
visit datetime
#VALUE!
01/01/2016 00:00
#VALUE!
02/01/2016 01:00
I need to change that format to
yy-mm-dd
So i can fill ...
0
votes
1
answer
30
views
How to substract custom date in models.DateField from now()?
I still can't find a working solution, hence I decided to throw my first post. Note, I'm a beginner in Django.
Building a portal that displays days since the user has been verified.
I tested my model ...
0
votes
1
answer
125
views
DateTimeFormatter - java.lang.IllegalArgumentException: Too many pattern letters: a
I have the following line in my java code where I am trying to format a date string
ZonedDateTime zonedDateTime= ZonedDateTime.ofInstant(instant, tz);
DateTimeFormatter formatter = DateTimeFormatter....
0
votes
0
answers
38
views
Incorrect date format from Microsoft.AspNetCore.OData provider to SQL Server
I am using Microsoft.AspNetCore.OData.
For the url filter
?$count=true&$top=100&$filter=Date%20gt%202022-03-17T00:00:00.000Z
the OData provider output to SQL Server is
AND ([q].[Date] > ''...
0
votes
1
answer
281
views
Datepicker Angular Material: Input field format change when change value of the field
I'm using a mat-date-rang-input of Angular Material. I changed the date format of Angular Material from MM/dd/yyyy to dd/MM/yyyy, and that's works alright.
<mat-form-field ngClass="...
0
votes
4
answers
40
views
Transform differents dates format to one format - Oracle SQL
I have a column with two date format :
DD/MM/YYYY
YYYY-MM-DD
I want to transform all date format of this column to only one date format, it is 'DD/MM/YYYY'
How can i do it in Oracle SQL ?
Thanks in ...
0
votes
1
answer
73
views
How to fix leap year Date
I'm having issues with Leap Year what can i do to change it to 28 feb or 1st march
i'm getting the below error,
Msg 289, Level 16, State 1, Line 21
Cannot construct data type date, some of the ...
0
votes
1
answer
67
views
Convert timestamp with letter T to normal date
I have this time 20220312T153020 from a json and I want to convert it to:
2022-03-12 15:30
I tried this code, but I'm getting an exception.
val fecha = "20220312T153020".replace("T"...
0
votes
0
answers
302
views
Jackson date pattern for deserialization microseconds/milliseconds
I receive messages from a service, a message contains date. Date can come in two formats:
2022-03-11T22:45:54.448907 - 6 digits after dot (kind of microseconds), and 2022-03-11T22:45:54.448 - three ...
0
votes
1
answer
34
views
How to change data format in sql?
I'm trying to change the data format to the "Aug 15, 2005" type from "2005-08-15" in SQL. I've tried multiple different functions like DATE_FORMAT, FORMAT, CONVERT, etc. But it ...
0
votes
0
answers
49
views
How to set generic date format (with CodecRegistry) for mongodb in Spring Boot Java project
I want to display mongoDB data as JSON in the webpage from my Sping Boot App. Inside my Spring Boot Application I am accessing MongoDB via MongoClient and I am using FindIterable to get all the ...
0
votes
0
answers
11
views
i neeed to change ms access 2007 date format for all separate files together
how to change date format dd-mm-yyyy to mm-dd-yyyy for separate files in access.
currently I doing changes one by one for each file .
can I have a solution.?
-1
votes
1
answer
34
views
I'm trying to extract month from date which looks like this "2008-08-17 00:00:00"
This is an example,Im trying combine two tables here which are db_match and country as you can see but I need to extract just month from the whole date so what could I try here ?
I tried,
update ...
1
vote
1
answer
41
views
SQL Date extraction month and year
The date format is 2018-02-04 , i would like to select the month and year from this to preferably get February, 2018, ill take 2018-02
the format is date/timestamp in postreg
1
vote
0
answers
142
views
dateformat showing wrong text output for weekday in flutter
I'm facing a problem, as in this question, but there is no answer.
first of all my code with int values, where the result ist correct:
List<int> listeWeekday() {
List<int> ...
0
votes
1
answer
52
views
how to only get the date in this format (year-month-day) or (day-month-year)?
I have the index.ejs file to output the books object like this:
<tbody>
<% for (let i = 0; i < books.length; i++) { %>
<tr>
<td><%= i+1 %...
0
votes
0
answers
54
views
Change date filtering format for datatables js
I'm filtering by date range using datatables js.
My range filtering works well if the dates in the table are in YYYY/MM/DD format.
<div class="input-group my-3">
<input class=&...
-2
votes
1
answer
978
views
Convert string timestamp "yyyy-mm-dd'T'HH:mm:ss.SSS+ZZ:ZZ" to string timestamp "yyyy-mm-dd'T'HH:mm:ss.SSSZ" [duplicate]
For example, if I have the string timestamp 2022-01-12T19:41:27.000+00:00, I would like to get 2022-01-12T19:41:27.000Z.
I would like to ensure that I come with a solution that can in the future take ...
0
votes
0
answers
216
views
Is it possible to display dates in power query as MMM/YY and keep it as a date format instead of text?
My problem is that I generated a pivot chart that is showing the axis values as DD/MM/YYYY. I changed the date format for the relevant column in the power pivot manager to MMM/YY and it looks fine in ...
0
votes
1
answer
24
views
How to add daySuffix to day using dateformatter in Swift [duplicate]
I am getting daySuffix with below code
func daySuffix(from date: Date) -> String {
let calendar = Calendar.current
let dayOfMonth = calendar.component(.day, from: date)
switch dayOfMonth {
case 1, ...
-1
votes
1
answer
114
views
How to change date format in a column in .pkl file in python?
I have a file in pickle format that I import to jupyter notebook using:
news_data = pd.read_pickle('/Users/Final/Data/news_articles cleaned.pickle')
Data has two columns as shown in this picture
The ...
0
votes
2
answers
186
views
How to convert Datetime from (ddmmyyyy hh:mm:ss) to (ddmmmyyyy:00:00:00) [SAS]
I need to convert hour, minutes and seconds to 00:00:00
I´ve tried a lot but i got nothing but the real time.
data pr; dat=put(date()-1,yymmddn.); datsas=PUT(datetime(), datetime.); run;
Thank You!
1
vote
1
answer
202
views
Dart DateFormat inconsistency
I'm trying to parse date string that looks like this Feb0920221500 (month, day in month, year, hours, minutes). But when I use MMMddyyyyHmm pattern I always get a FormatException. Furthermore intl's ...
1
vote
1
answer
37
views
Manipulate date format
While merging datasets, there are different kinds of date format that disable to join these datasets.
the values of date as a year unit is what I needed, like 2004, 2005, 1996, 1987.
but they have ...
1
vote
1
answer
126
views
MySQL DATE_FORMAT from '1970-01-01T00:00:00Z' to '1970-01-01 00:00:00' [duplicate]
Hello I have a MySQL query like:
UPDATE Table_name
SET
Value= DATE_FORMAT(Date, '%d-%m-%Y %H:%i:%s')
WHERE id = 3
It results in an error message
"message": "Data truncation: Truncated ...
-1
votes
3
answers
391
views
how to calculate difference between two date and get year month and days in flutter
How can I change Date formate in dart
I get the from and to date difference value is int. How to change this integer to date format... and convert it to 0Days 0Months 7days;
I need this type of format ...
0
votes
0
answers
12
views
Varchar to Datetime and convert to ear,month,day
I have a table("orders") with a field ("order_date", varchar,default value null).
I need to transform that column "order_date" into date time, and then separate at Year,...
0
votes
0
answers
27
views
React Format Time while mapping fetched Data
i am fetching a User List and map the response to a table, this works fine for me so far. The Created Date is from a datetime.utcnow Time Format and looks ugly in the table (2022-01-18T11:35:41.063765)...
-2
votes
2
answers
332
views
JavaScript: Generate current date with custom format
I am trying to generate the current date in the Date Month, Year format. Currently I am using following code:
function currentDate()
{
var months = [
'Jan', 'Feb', 'Mar', 'Apr', 'May', '...
0
votes
1
answer
151
views
Date_format function in hive
I ran a basic select statement in hive expecting 20211227 but hive return 20221227.
select date_format('2021-12-27','YYYYMMdd')
I ran the statement below and it gives me expected result 20211225. Not ...