Skip to main content
Filter by
Sorted by
Tagged with
1 vote
0 answers
83 views

Currently, in Java I have tested using IBM SimpleDateFormat and Java DateTimeFormat, both cannot parse "Rab, 25 Agt 2025" due to IBM and Java only recognize "Agu" Is there any ...
Deddy Chandra's user avatar
2 votes
1 answer
61 views

DateFomatter could not init the date from "1995-03-26" string when using "Europe/Sofia" timezone. I've also tried to use different timezones and everything works correctly, but not ...
Roman Kovalchuk's user avatar
0 votes
2 answers
154 views

I need a way to format a time in the shortest way possible. Unforunately using a timeStyle of .short doesn't achieve what I want because times with zero minutes always unnecessarily show :00 in 12-...
Oliver Pearmain's user avatar
1 vote
1 answer
51 views

I have a table view which has few cells. I need to display the date in a human-readable format whose raw format is retrieved from the API call. I am using the below code to call the convertToDate ...
Max's user avatar
  • 5,992
-3 votes
1 answer
121 views

I tried to get the date and time from Timestamp. when I see it in iOS 16+ simulator it shows 04.46 PM whereas in iOS 14.2 it shows 16.47. Is there anything im doing wrong here? Timestamp value: ...
Sarath's user avatar
  • 339
-1 votes
1 answer
70 views

My scenario: I have a random date in string formatted like "ddMMyyyy". (I know that is wrong to save data as string, please don't judge i get the data from a 3rd-party app). And i want to ...
S3minaki's user avatar
  • 319
0 votes
2 answers
592 views

i am using react js and i am trying to convert UTC time to PST time but it is not converting according to online compilers. Code: const dateString = "12/18/2023, 8:00:00"; const utcDate = new Date(...
Harish Mahi's user avatar
0 votes
4 answers
142 views

I receive a date let slotDateString: String = "2023-12-06T15:45:00+04:00" I have two formatters: var iso8601FormatterWithFullTimeZone: DateFormatter { let formatter = DateFormatter(...
Vader20FF's user avatar
  • 383
0 votes
1 answer
447 views

I am trying to print a date and time, I would like the String representation to include the UTC offset. This seems to work for date and times which are in the BST time zone, however when the date and ...
Gavin's user avatar
  • 1,777
0 votes
0 answers
51 views

I'd like to ask for an explanation why Dateformatter adds time and -1 day that I don't want. I need to save the date only in the format "yyyy-MM-dd" in the Date type field in Core Data let ...
user22038725's user avatar
0 votes
1 answer
608 views

I'm localizing my app for Hungarian users and having trouble figuring out how to handle a string with a date in it. In English, I have a text string that should say "4 reps @ 120 kg on 8/19/23&...
Jim's user avatar
  • 1,550
-1 votes
3 answers
446 views

I'm trying to convert 24 hours to 12 hours and when I run the code it does not convert to 12 hours. I'm not sure what I'm doing wrong. Here's my code. func getDate(date: Date) -> String { let ...
wwarren07's user avatar
0 votes
3 answers
143 views

i am trying to parse string date which is coming from an API to Date(). the date string is: 31-07-2023 12:44 (EEST) My code: let formatter = DateFormatter() formatter.dateFormat = "dd-MM-yyyy hh:...
Kodr.F's user avatar
  • 14.5k
-1 votes
2 answers
81 views

I'm using DateFormatter from Swift to show date to users in "yyyy.MM.dd" format. I find one thing very strange that even after I've set the Timezone, it gives me the date a day after. let ...
hyo's user avatar
  • 9
0 votes
0 answers
42 views

facing the following issue: I'm try to create a date by adding 2 strings one with a date "23/06/2023" and one is the time "21:00" why I'm getting this strange result: see my ...
Damiano Miazzi's user avatar
1 vote
1 answer
63 views

I want to check if the current date input is 1 second away from new date (Date format: "2023-05-20T23:59:59.000+05:30"). Below is my Date extension. extension Date { var isOneSecondAway: ...
iOSDev2013's user avatar
0 votes
0 answers
143 views

I'm trying to convert a date-time string to a date, with a DateFormatter with the TimeZone set to UTC. The input string is in the format yyyy-MM-dd'T'HH:mm:ss'Z'. For some reason, the subsequent Date ...
SamuraiMelon's user avatar
-1 votes
1 answer
192 views

I am trying to solve my issue with a Unix Timestamp. I figured out how to present it but the result is too long - it says: "Friday March 31, 2023 at 11:13:52 PM Central European Summer Time" ...
alancord's user avatar
0 votes
1 answer
121 views

problem: how to make the date display in a beautiful form, in the format "month-year"? my code: decompose_data = seasonal_decompose(df_res_indx, model='additive') fig, axes = plt.subplots(...
Kirysha's user avatar
  • 25
1 vote
2 answers
102 views

My code: let dateFormatter = DateFormatter() dateFormatter.timeStyle = .short dateFormatter.dateStyle = .short dateFormatter.locale = .current lblDateTime.text = ...
Gargo's user avatar
  • 1,379
0 votes
0 answers
341 views

I have several dates that I want to store in CoreData. Those dates will always be fixed regardless of timezone and the time component is never needed. So that when the date is fetched and displayed ...
alionthego's user avatar
-1 votes
2 answers
97 views

I have this simple code (Xcode iOS app) import SwiftUI struct ContentView: View { var body: some View { VStack { Button(action: { let dateToday = Date() ...
THUB's user avatar
  • 314
0 votes
1 answer
128 views

Trying to convert Int to formatted string date with supplied timezone value and formatter to expected result "12/01/2022 09:03:41 PM THA". //Response Data. { "code": "...
kiran's user avatar
  • 4,399
0 votes
0 answers
126 views

I noticed in our product that some legacy code is trying to initialize Locale for DateFormatter with invalid identifiers. (e.g. Locale(identifier: "UTC")) Weirdly code is working fine for ...
banderson's user avatar
1 vote
0 answers
133 views

I was working on Time conversion from One Locale to another (US to Swedish) in android using Java. It is working well on all the devices except Samsung devices. DateTimeFormatter parser = ...
Shobhith's user avatar
  • 495
0 votes
1 answer
915 views

If I use system locale (Locale.autoupdatingCurrent) then DateFormatter uses 24 switch in system settings. let locale = Locale.autoupdatingCurrent; let timeZone = TimeZone(secondsFromGMT: 0*3600)! var ...
john07's user avatar
  • 564
0 votes
0 answers
419 views

If Language is French and Region is Canada, the Languge & Region pane in Settings shows 24 hour time formatting in the sample area as expected, as does the rest of iOS and stock apps. But if I ...
t9mike's user avatar
  • 1,626
-2 votes
1 answer
84 views

I have time values in JSON like so: "start_date": "2018-04-20 9:00:00 -08:00", "end_date": "2018-4-20 12:00:00 -08:00" I want to ...
Sam's user avatar
  • 33
0 votes
1 answer
71 views

Firstly I have to say this. ÖÖ: AM ÖS: PM I have hours array like that: [["12:15 ÖS", "02:00 ÖS"],["09:00 ÖÖ", "10:00 ÖÖ"],["10:30 ÖÖ", "12:00 ...
Ufuk Köşker's user avatar
1 vote
1 answer
777 views

When I try to convert date to Arabic language with below code & ar_AE language code, it shows date in western numerals not in Arabic. let dateFormatter = DateFormatter() dateFormatter.dateStyle = ...
Nico's user avatar
  • 1,838
0 votes
1 answer
546 views

i'm using this method to set my title format but when i click on next arrow button month and year not change, sep,2022 not change <com.prolificinteractive.materialcalendarview....
Vishal Thakur's user avatar
1 vote
1 answer
381 views

The app crashes once the user selects any date of September. It only happens with iOS 15.4. I have datePicker formatted date to return always in UTC format en_GB. @objc func doneDateClicked() { ...
Vladislav Yarmak's user avatar
-1 votes
1 answer
1k views

This is the error I get Invalid data: typeMismatch(Swift.Double, Swift.DecodingError.Context(codingPath: [CodingKeys(stringValue: "Services", intValue: nil), _JSONKey(stringValue: "...
Angadveer Singh's user avatar
0 votes
0 answers
29 views

I need to convert a string date in the following format and while the date is returning correctly the time is not. The string being sent is "2022-08-16 02:07:11 America/Los_Angeles" however ...
Warve's user avatar
  • 521
0 votes
2 answers
949 views

How to make the st,nd,rd,th as supescript along with date and time in swift xcode 13. I have set the items in the tableviewcell From the tableView cell I'm setting the date and time like in below code ...
JESTIN SAJI's user avatar
-1 votes
1 answer
585 views

I'm receiving a PST date inside a string in the following format "2022-08-14 13:45:39 America/Los_Angeles" and I'm trying to convert it to a real date using the code below which is causing ...
Warve's user avatar
  • 521
0 votes
0 answers
569 views

I have Swift 5 and such date string: let dateString = "2019-11-09T08:14:09.361404Z" and two approaches to convert it to date: let dateFormatter = DateFormatter() dateFormatter.dateFormat = &...
Maxim's user avatar
  • 43
3 votes
2 answers
210 views

I want to accept Arabic date in the query parameter ex: ٢٠٢١-٠٧-٢٠ the English version of this date is 2021-07-20 I have found this soltion DecimalStyle defaultDecimalStyle = DateTimeFormatter....
Mohamd Ali's user avatar
  • 2,256
0 votes
1 answer
71 views

when I use DateFormateer it returns me a day before. nextDayShouldBe = currectDay.addingTimeInterval(24 * 3600) print(nextDayShouldBe) //prints (2022-07-02 21:58:11 +0000) it's right let ...
fonzyara's user avatar
-1 votes
3 answers
142 views

My requirement is to convert date string (in PHT) received from my API to another date string format. API Date String format: "MM/dd/yyyy HH:mma" eg. "06/28/2022 06:55PM" UI Date ...
Vaibhav Misra's user avatar
0 votes
1 answer
2k views

My code is ZonedDateTime zoned = ZonedDateTime.now(); DateTimeFormatter pattern = DateTimeFormatter.ofLocalizedDate(FormatStyle.MEDIUM).withLocale(Locale.forLanguageTag("ja-JP")); System.out....
zxwang's user avatar
  • 51
1 vote
1 answer
2k views

I want to use the following ISO 8601 Format(Date and time with timezone) : yyyy-MM-ddTHH:mm:ss.SSSZ To verify if the string date is valid or not. I have as input a String date String dateRight = "...
coding2's user avatar
  • 57
0 votes
1 answer
66 views

I have develop a function that calculate the time difference between two date giving the two date as string here below the function func calculateTimeDifference(startDate: String, endDate: String) -&...
Nicola Rigoni's user avatar
-1 votes
1 answer
2k views

I have an issue related to retrieving time from time stamp. Below is the code, I get the timestamp from gui, which I need to convert into hh:mm:ss and insert into database. LocalDate timestamp = ...
Krishna Lakshmi's user avatar
0 votes
2 answers
249 views

I have a little problem and I don't know how can I solve it. I have a closedRange of dates which i'm using with a DatePicker. How can I have a date with that format that I have in the code bellow ? ...
Berserker's user avatar
0 votes
0 answers
298 views

I’m playing about with SwiftUI for the first time with a simple to do style app. It has 2 views, one a list view, and the other an Add To Do view, which saves info into core data. In core data I have ...
James Hunt's user avatar
10 votes
0 answers
5k views

Updated iPad to iOS 15.4. Now String to Date conversion using DateFormatter returns nil when stored month format "MMM" = Sep. Works ok when MMM Month = Sept. Did work in iOS 15.3 and earlier....
GDev's user avatar
  • 101
1 vote
1 answer
2k views

I need date to be convert from dd MMMM YYYY to dd-mm-yyyy. e.g. : (01 August 2021) -> 01-09-2021 let dateFormatter = DateFormatter() dateFormatter.locale = Locale(identifier: "en_US_POSIX"...
lauwis's user avatar
  • 431
2 votes
1 answer
420 views

I want to display start and end date of week in a human readable format. Using MMMM d as date format base. For example: - March 7 - 13 - February 28 - March 6 - 7-13 de marzo So if week start and end ...
sha's user avatar
  • 17.9k
0 votes
1 answer
172 views

I'm using a String extension to parse utc string to Date. But the parsed date is wrong. Not sure what i'm missing. extension String { var parseUTCDateTime:Date? { let parser = DateFormatter() ...
Iniamudhan's user avatar

1
2 3 4 5
7