Questions tagged [date-format]

1

votes
3

answer
2.9k

Views

Can we pass value to annotations at runtime?

We need to create an annotation in java called DateFormat. It will take string dateformat eg. class User { @Dateformat('MMM/dd/yyyy') private Date birthDate; } Here the date format is statically passed as an argument to the annotation. Is there any way we can pass this date format at run time may...
ashishjmeshram
1

votes
3

answer
40

Views

Change all date format in dataframe

I am very new to R programming and kind of stuck in this: I have a dataframe and I want check if there any value in any of the rows/columns which is in date format, should be stripped off to only time part. For example a date string of '2015-01-02 10:15:44' should be changed to '10:15:44' I know, it...
Om Prakash Sao
1

votes
0

answer
181

Views

Angular2 Moment invalid date

I've saved my Date with UTC format in my database. To show the date in the proper format is using angular2 moment. {{ task.updated_at | amTimeAgo}} | {{ 1517229284787 | amTimeAgo }} The above statement is my case. Here the first binding showing invalid date forma...
TheLawliet94
1

votes
1

answer
697

Views

How to insert a date in the format dd-mm-yy in MySQL?

I have to insert dates in MySQL with the format dd-mm-yy. I know that if I change the date format to yy-mm-dd it will work, but my client wants it in the format dd-mm-yy, and the default format of a MySQL date is 0000-00-00.
Aly Al Ameen
1

votes
0

answer
259

Views

Laravel change all datetime format before insert

I try to install passport but when I execute php artisan passport:install This returns me an error in datetime formats: The conversion of nvarchar data type to datetime produced a value outside of range this is because I use sql server and the format date of datetime is Ydm H:i:s and carbon returns...
Abel Olguin Chavez
1

votes
1

answer
806

Views

Angular 2 , month and year only needed in datepicker

i need the date to be pass like this 2018-03 using BsDatepickerModule of ngx-bootstrap, i have got the result like this 2018-03-04 by using the code ...... self.dateSales = dateofSales.toISOString().split('T')[0]; ....... Help me to covert the date to yyyy-mm and yyyy format
Aashiq Rathnadas
1

votes
1

answer
76

Views

Date format set to dd/mm/YY returning Y-m-d after search validation

I have an odd behaviour on a website I work on. The datepicker is set to dd/mm/yyyy and works fine on one of the pages displaying results, but on the other one, after submiting and the page getting refreshed, it changes the format displayed to y-m-d. I'm using foundation datepicker plugin on a Phalc...
HiD3f
1

votes
1

answer
679

Views

datepicker change date format on form submit

I am using jQuery datepicker, and I am displaying my date in dd-mm-yyyy format but I need to send date in yyyy-mm-dd format to store in database. $(document).ready(function(){ $('.datepicker').datepicker({ format : 'dd-mm-yyyy', maxDate : new Date(), selectMonths : true, selectYears: d, yearRange:...
Prashanth v
1

votes
1

answer
27

Views

date_format time with “:” produces warning

having a query like this (on a MariaDB 5 database): SELECT DATE_FORMAT(FROM_UNIXTIME(mov.date), '%H:%i') AS time FROM ek_movement mov displays an error / warning in phpmyadmin query editor saying, it has added a closing bracket for me. The cause of that is obviously the char ':', separating the hour...
whocares81
1

votes
2

answer
351

Views

ElasticSearch not recognizing date type, shown as String type

ElasticSearch version: 6.3 mapping definition: ES_DOCTYPE = { 'properties': { 'UsageEndDate': {'type': 'date', 'format': 'YYYY-MM-dd HH:mm:ss'}, 'UsageStartDate': {'type': 'date', 'format': 'YYYY-MM-dd HH:mm:ss'} } } json data: { 'UsageEndDate': '2018-08-01 02:00:00', 'UsageStartDate': '2018-08-01 0...
keypoint
1

votes
0

answer
43

Views

not keeping the dates when creating a dataframe pandas

I am merging multiple xlsx files using pd.concat(). I have 7 date columns with custom formatting in excel file. When I concatenate the files, instead of keeping the original dates, all dates change to today's date. I would appreciate your help. Columns, contains dates are given by indices. Here is t...
Ani
1

votes
0

answer
24

Views

change EEE format to another language

How can i change EEE format at will? if ($scope.languageCode == 'jp') { $scope.dateFormat = 'yyyy年M月d日(EEE)'; //Should i try some switch case here? } else if($scope.languageCode == 'en') { $scope.dateFormat = 'yyyy/M/d (EEE)'; }; html {{today| date:dateFormat}}
AndyJJ
1

votes
1

answer
81

Views

Kendo JS Grid Issue with Date Fields

We have strange issue with the Kendo UI Grid in production site. For some users the date fields are showing as null in Google chrome and working fine in private window and other browsers like IE,MSEdge. We are unable to reproduce the issue The code code is as below. While exporting the grid to Exc...
TARUN
1

votes
1

answer
42

Views

How to convert 'PT6H52M38S' to 'h:mm:ss' format [closed]

I am working with a Clockify API integration. It returns me a time duration like this PT6H52M38S. That is 6 hours, 52 minutes, 38 seconds. I want to display PT6H52M38S as 6:52:38. I have used date pipe like this {{item.timeInterval.duration | date: 'h:mm:ss}} but it throws an error. I don't unders...
lakhan
1

votes
0

answer
13

Views

python 3 datetime.strptime doesn't work with German format

Need to change a string in German into a date. I try to use the following code: from datetime import datetime datetime_object = datetime.strptime('24. Juli 2017', '%d %B %Y') print(datetime.strftime(datetime_object, '%d.%m.%Y')) this code fails with the next error: ValueError: time data '24. Juli 20...
Roman
1

votes
1

answer
25

Views

Json parse error with jackson, InvalidDefinitionException occurs while converting to java.time.LocalDateTime

using jackson library covert json string to kotlin object error Exception in thread 'main' com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Cannot construct instance of `java.time.LocalDateTime` (no Creators, like default construct, exist): no String-argument constructor/factory metho...
user3309336
1

votes
1

answer
38

Views

c# .net core difference in date format MMM on Windows and Linux

I've run into an issue. I need to parse Date in specific format ddMMMyy in cyrillic. When I run .net core application on Windows, date 08АПР19 correctly being parsed into 2019-04-08 but it throws exception when I parse it on Linux server Exception: String '08АПР19' was not recognized as a vali...
Igor Khramtsov
1

votes
2

answer
866

Views

How can I remotely (via web services) determine date format of SharePoint 2003 site, for use in Versions.asmx returned XML?

The GetVersions() call to the Versions.asmx web service in SharePoint 2003 returns a localised date format, with no way of determining what the format is. It's the site regional setting of date format, but I can't find a way to get even that out of SharePoint 2003. Locally, it looks like SPRegionalS...
Michael Baltaks
1

votes
2

answer
1.2k

Views

php/mysql - date_format and the time portion

Apologies if this has already been answered many times, but I was unable to find the answer and I was flummoxed. I have a mysql query which seemingly outputs the result I want when I run it in the database - however when I run the query through PHP, it does not output correctly. In the database, dat...
1

votes
1

answer
878

Views

Groovy date formatting problem

I am developing a groovy application and I am having problems when showing a Date field. If I use the following notation: I am getting the actual date instead of what is saved at the DB. When I use this notation it works properly. am I doing something wrong here? Are not both notations equivalent?...
Luixv
1

votes
2

answer
2.4k

Views

Grails: How to get dates in g:textField from calendar?

I have four entry fields from a search filter. I was originally using g:datePicker but it was not quite what I wanted, it was too slow to select the date from drop down boxes, so I decided it was better to use a simple grails text field and next to it a calendar image that would trigger the calendar...
randomizertech
1

votes
1

answer
33

Views

Inconsistent automatic pandas date labeling

I was wondering how pandas formats the x-axis date exactly. I am using the same script on a bunch of data results, which all have the same pandas df format. However, pandas formats each df date differently. How could this be more consistently? Each df has a DatetimeIndex like this, dtype='datetime64...
Mina Berny
1

votes
3

answer
752

Views

what is the date format of “22:40:29.668 EET Sun Jan 02 2011” in java?

what is the date format of '22:40:29.668 EET Sun Jan 02 2011' in java. what i nedded is to know the format of this date ex. format of 12/12/2011 is dd/mm/yyyy.
Georgian Citizen
1

votes
1

answer
728

Views

How to intercept WCF JSON parsing for a post request

I have a WCF web service which uses JSON format, my problem is with the date fields, when I try to post a date to my service I can't find any other format other than the '/Date(53244000000)/' where the number is the number of milliseconds since 1970 midnight. My Project manager is not accepting with...
Ahmed Ebied
1

votes
1

answer
1.5k

Views

Arabic date displaying incorrectly

I'm using the following code to display an arabic date: Dim dtFormat As DateTimeFormatInfo = New CultureInfo('ar-sa', False).DateTimeFormat dtFormat.Calendar = New HijriCalendar() Dim hijriDate As String = Now.ToString('d MMMM yyyy', dtFormat) Today this is displaying as 16 ربيع الثاني 143...
Curt
1

votes
1

answer
307

Views

PHP date_add is alias of DateTime::add, but who calls who internally?

Like date_add there are many functions date_diff, date_format etc having a corresponding alias in DateTime class. Do you know if internally DateTime::add calls date_add or vice versa? And just to make sure: is DateTime class compiled internally in PHP, isn't' it? I mean when I call DateTime class, a...
Marco Demaio
1

votes
2

answer
106

Views

Random behavior in CakePHP?

echo $form->input('birthday', array( 'label' => 'Birthday', 'type' => 'date', 'dateFormat' => 'MDYMDY', 'value' => $bday, 'empty'=>false, 'minYear'=>1900, 'maxYear'=>$max_year-12 )); I have a user, whose birthday is 3/5/81 (m/d/y). It is stored as a unix timestamp. This is what is displayed: http://...
David Ryder
1

votes
1

answer
1.9k

Views

Date formating through Javascript - JQuery

Okay, Dates are always a kick in the nuts (at least for me) and I faced the fact that Javascript doesn't seem to have a method to format dates. I'm trying to format a date to use the Google API which ask you for a date in this format: yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffff (e.g. 2011-06-25T10:00:00.0...
Antonio Laguna
1

votes
2

answer
936

Views

SQL Server Date Format India to US

I've a service which push date from my SQL server database to web database and the date format that is pushed is 'yyyyMMdd'. My database resides in india, so date format and current date is based on Indian Culture and Locale based. And my web server resided in US, so there the date format is based o...
manav inder
1

votes
1

answer
1.2k

Views

SimpleDateFormat parse time function in objective c

I am making replica of an android application, there is code for time SimpleDateFormat myDateFormat = new SimpleDateFormat('HHmmss MMddyyyy'); Date noteTime = myDateFormat.parse('235959 12319999'); I want the objective-c code which produces the same result.
Azhar
1

votes
1

answer
1.6k

Views

windows server 2008 R2 date format reverts to US

Very strange phenomena with Windows 2008 R2 setup and scratching my head for more than couple of hours now. What is happening when an Application is run via a user it picks up correct date format i.e. DD/MM/YYYY and however when run via Task Scheduler, the same applications yields US date format. I...
user952031
1

votes
5

answer
157

Views

What does this MySQL function output when written like this?

I've ordered a project from a developer, and I'm trying to fix the errors I find along the way. One is a MySQL query with the DATE_FORMAT() function, that makes the query not return anything. SELECT * FROM food_cart WHERE cart_userId='3' AND cart_itemId='8' AND date_format(cart_date,'%Y-%m-%d %H'...
Mike Haye
1

votes
1

answer
919

Views

set culture information for custom date format

I am facing a problem in date format. I am converting a string date(dd/MM/yyyy) to datetime, using convert.toDateTime(). It works fine on my local machine but causes problem when I run from server. So to set uniformality, I tried to set culture info for (yyyy-MM-dd HH:mm:ss) format, but couldn't set...
Microsoft Developer
1

votes
1

answer
1.2k

Views

MySQL DATE_FORMAT using BETWEEN doesn't work

I'm using two stored functions, They work and when put into SELECT, they return proper values, however when i try to reduce and get a subset of those values, I get an empty set with no warnings. Here's my SQL. SELECT DISTINCT e.ims_event_id, e.name, e.begin_time bUTC, e.end_time eUTC, DATE_FORMAT(D...
dlite922
1

votes
2

answer
170

Views

How to add a javascript variable to this php line?

I have a Javascript function which gets a date from a jQuery datepicker. Now i want to print this selected date in this format. $selecteddate = strftime('%A').date('(d-n-Y)'); How can i add this date, which is a javascript variable to this php format? Because I would like to echo $selecteddate later...
Sino
1

votes
1

answer
366

Views

Change Date Format in Trello.NET

I have used Trello.NET to integrate Trello into our own bugtracking application. Our own application has an european date format (dd/MM/yyyy). the Trello API has an American format (MM/dd/yyyy). TrelloNet uses RestSharp to do the REST communication. How can change the serialization output to MM/dd/y...
tomjanssens
1

votes
1

answer
2.9k

Views

Identifying the date format in the client's machine

I have a requirement in my project to show a date in the client machine format. I am aware of the property in javascript window.navigator.userLanguage or window.navigator.language.. But it is only returning the language of the client machine like 'en-US', 'en-GB' etc. If the user customizes the dat...
Suhaib
1

votes
1

answer
51

Views

Joining two mysql queries containing time functions

I need to join the result of the next two queries: SELECT EXTRACT( HOUR FROM ( TIMEDIFF( NOW( ) , ( SELECT MIN( date_cmd ) FROM arc_commande_temp WHERE id_cmd = '6580' ) ) ) ) AS HOURS SELECT EXTRACT( MINUTE FROM ( TIMEDIFF( NOW( ) , ( SELECT MIN( date_cmd ) FROM arc_commande_temp WHERE id_cmd =...
MiGU
1

votes
2

answer
447

Views

facebook registration birthday mysql returning 0000-00-00

I have 1 problem to fix with my facebook registration plugin for a website. im trying to insert the birthday into the db, facebook format is dd-mm-yyyy...im getting a result 0000-00-00, $sql = 'INSERT INTO users(facebook, email, username, country, gender, dob, password, profile, activated, i...
1

votes
1

answer
69

Views

Change format of date

I got a NSString *string = @'2012-10-24 23:00:00 +0000'; And I want to convert that to a normal format 24 october 2012 I use the following code. But it keeps crashing. Can anyone help me? NSDateFormatter *dateformat = [[NSDateFormatter alloc] init]; [dateformat setDateFormat:@'yyyy MM dd HH:mm:SS zz...
user1806621

View additional questions