187 questions
-1
votes
2
answers
100
views
Getting unparsable date error in groovy script
I have below code snippet :
java.util.Calendar calendar = java.util.Calendar.getInstance();
curdate = "2025-01-31T12:27:00"
def parsedDate = new Date().parse("yyyy-MM-dd'T'HH:mm:ss&...
-1
votes
1
answer
87
views
supress Java checked Exception [duplicate]
I have writen the following code. I know it might not be the correct approach. but this is what i have done.
public class ValidationRule {
private static SimpleDateFormat sdf = new ...
0
votes
1
answer
58
views
difference between ParseException and TokenManagerError (javaCC)
What is the difference between ParseException and TokenManagerError?
Topic: javaCC, generate parser, error message
An example to explain would be good.
Tries to read in literature or error message, ...
1
vote
1
answer
186
views
"WITH x AS " ParseException Error in DataBricks notebook
I'm trying to JOIN two tables in a DataBricks Notebook. The first line in the SQL statement is erroring-out.
I can't determine why. The docs I've read say its typically due to a typo. But that is not ...
0
votes
1
answer
183
views
Why ParseException is not caught?
Why is ParseException not caught here? When I enter a date consisting of more than 4 digits it just accepts it, but it shouldn't as I set lenient to false. When I enter letters for the year I get ...
0
votes
2
answers
155
views
How to convert a date into another date as a String in Java?
I want to convert a date format into another date format. For example, I have this String "05-Apr-23" and I want to convert it into this String "05/04/23". And I did this ...
1
vote
1
answer
1k
views
java.text.ParseException: Unparseable date: "1 Sep, 2022"
In my android app, I am using following code to convert date in other format. But it is not working.
var format = SimpleDateFormat("dd MMM, yyyy")
var date2 = format.parse("1 Sep, 2022&...
1
vote
1
answer
405
views
NumberFormating issue with negative numbers in RTL Locale like Arabic
Locale locale = new Locale("ar", "AE");
NumberFormat format = NumberFormat.getNumberInstance(locale);
System.out.println(format.parse("55-"));
The above ...
1
vote
1
answer
265
views
Passing token in header through variable getting an error of ParseException
Will try to be precise in asking question. Sorry if couldn't do it up to the mark!
Was given an assignment to automate api from the given below link
https://restful-booker.herokuapp.com/apidoc/index....
0
votes
1
answer
275
views
Inserting Data from Dataframe into Ontology using SPARQL and RDFLIB in Python
I created an ontology using protegee and now want to insert data using RDFLIB in python. Because I have to write the update sparql statements in string and my data comes in various types including, ...
0
votes
1
answer
2k
views
Parseexception kw_end missing near 'as'
I am getting parseexception kw_end missing near 'as' error for the below query :
Case
when x=y then
case when g<h then 2 else 0 end
When x=z then
case when i>k then 6 else 0 end
else
...
5
votes
1
answer
5k
views
How to get json column as string in postgresql with jpa criteria builder?
I have a json column in table like:
@Type(type = "jsonb")
@Column(name = "json_data", columnDefinition = "json")
private List<Persion> jsonData = ...
1
vote
1
answer
1k
views
After i added throws ParseException, the parse excception still occured, why?
The question is to calculate the days between two dates. Here's my code
public static void main(String[] args) throws ParseException {
// TODO Auto-generated method stub
SimpleDateFormat sdf=...
0
votes
0
answers
448
views
NiFi Caused by: java.text.ParseException: Unparseable date
I'm trying to insert a flowfile from NiFi into PostgreSQL database. Flowfile is a JSON which keys are: id, timestamp, metric1, metric2, ..., and I have problems with timestamp data.
This is the value ...
0
votes
4
answers
625
views
I have a problem about SimpleDateFormat function in java
I don't know why there is no error. The code is
String datestr = "2021-01-01";
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM");
try {
System.out.println(sdf.parse(...
1
vote
1
answer
2k
views
java.text.ParseException: Unparseable date. "dd MMM yyyy HH:mm:ss" format [duplicate]
I am getting a parsing error with the following code
String time = "24 Apr 2021 11:56:44";
Date timeOnLine = new SimpleDateFormat("dd MMM yyyy HH:mm:ss").parse(time);
Exception:
...
0
votes
2
answers
6k
views
BeanShell script error: bsh.ParseException: Parse error at line 126, column 23. Encountered: ,
I have a code which works fine on Eclipse but when I run it on the Sailpoint tool (which is a beanshell environment) gives following error:
Message key="sailpoint.tools.GeneralException: ...
2
votes
2
answers
326
views
How to make a program that reads a date and calculate the number of days left until the end of year?
i have a really simple problem, i don't know how to deduct the user's date by 01/01 / (the user year) +1. Im really stuck at this point.
public static void main(String[] args)
{
String date;
...
0
votes
1
answer
4k
views
missing EOF "" at "" in hive query
can I get help...im really newbie at SQL, and this code is a legacy from my former asscociate.
Im using hive query and I got an issue at line 53:65 missing EOF
here's the code:
SELECT
'24-08-20' AS ...
1
vote
1
answer
64
views
Changing the Session Languge leads to "java.text.ParseException: Unparseable date
whenever I'm defining the timeframe being in German session language after changing to English lang. session (and vice versa) I'm getting the:
java.text.ParseException: Unparseable date: "10.10....
0
votes
0
answers
400
views
Declare Date on Constructor [duplicate]
Just started studying java and have an exercise to complete.
I have the following code:
package exercise1;
import java.text.SimpleDateFormat;
import java.util.Date;
public class Singer {
//Class ...
0
votes
1
answer
401
views
java use simpledateformat to parse a input String get ParseException, and just because of a space
I input a string likes the SimpleDateFormat pattern asked, but it will be ParseException. I do several tests. If I change space between "dd HH" to "dd-HH", the pattern becomes "yyyy-MM-dd-HH:mm:ss", ...
3
votes
6
answers
4k
views
Calculating days between two dates in JAVA (catch ParseException error)
I’m trying to calculate the number of days between 2 dates. When I run this, it throws the catch (ParseException ex).
import java.text.SimpleDateFormat;
import java.text.ParseException;
import java....
6
votes
1
answer
4k
views
java.text.parseException: Unparseable date : 2020-02-06T08:00:00
Getting parse exception when I'm applying a particular format to the date.
SimpleDateFormat df = new SimpleDateFormat("hh:mm a");
try {
String s=timeSlotsArrayList.get(position)....
1
vote
0
answers
333
views
Access Hive via pyodbc gets ParseException with extra EOF
Python: 3.6.8
pyodbc: 4.0.27
OS: ubuntu 18.04
DB: Hive 0.13
driver: Hortonworks ODBC driver for Hive downloaded at http://public-repo-1.hortonworks.com/HDP/hive-odbc/2.1.2.1002/debian/hive-odbc-...
-2
votes
2
answers
103
views
Need to Format String Date in different format in java [closed]
I have a String date "30 Aug 2019". I want to format in "2019-08-30'.
I am trying with following code. It is not working.
String input = "30 Aug 2019";
Date date = sdf.parse(input);
...
0
votes
1
answer
195
views
Error: [mapper_parsing_exception] Root mapping definition has unsupported parameters
i have some problem with this code ,evrytime i try to index it, it display the error:
"Error: [mapper_parsing_exception] Root mapping definition has unsupported parameters: [document : {dynamic=false,...
1
vote
1
answer
76
views
Correct SQL query throwing ParseException on Spark2-Scala
I wrote a HQL query that works fine in Hive, transforming it into a dynamic sparkSql Scala query throws ParseException:
val l="1900-01-01 00:00:00.000001"
val use_database="dev_lkr_send"
...
0
votes
0
answers
177
views
Getting Java.text.ParseException
Exception in thread "main" java.text.ParseException
at org.json.JSONTokener.syntaxError(JSONTokener.java:374)
at org.json.JSONObject.<init>(JSONObject.java:154)
at org.json.JSONTokener....
1
vote
1
answer
2k
views
java.text.ParseException: Unparseable date: "20:01:00.000Z"
I am getting a value for my time field in this format "10:30:00.000Z".
I want to convert it to 10:30 AM/PM format. I'm trying to make use of SimpleDateFormat and parse it but I'm getting java.text....
0
votes
1
answer
396
views
How to manipulate ParseException in Javacc
I have created a lexer and parser in javacc and I am trying to handle errors. I initially tried using try-catch blocks for each symbol that is missing in the parser but I read online something about ...
2
votes
2
answers
4k
views
How to fix 'Date Time Parse Exception' in Java
I have a Date Time Formatter Which I am trying to format inputted dates into format (d/MM/yyyy) Shown Below
DateTimeFormatter format = DateTimeFormatter.ofPattern("dd/MM/yyyy");
I am then using this ...
0
votes
3
answers
197
views
Error in converting String to Date in Java [duplicate]
DateFormat d1;
d1 = new SimpleDateFormat("dd-MMMM-yyyy");
public String duedate = "20-April.2019";
Date du = d1.parse(duedate);
The Error I keep getting is:
Default constructor cannot handle ...
0
votes
2
answers
381
views
Unable to remove ParseException
try{
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss.SSS");
Date parsedDate = dateFormat.parse(tm);
timestamp = new java.sql....
0
votes
0
answers
696
views
Symfony - using column in unquoted mapping value is deprecated
I am configuring my security.yml file and adding new link that will throw an ParseException with my Symofny 3.0.
access_control:
- { path: ^/download/thing/{hash}, roles: [...
2
votes
3
answers
2k
views
Date Function is trimming seconds where seconds is 00
OffsetDateTime odtB = OffsetDateTime.parse("2019-02-02T13:55:00Z");
odtB.toString()
prints 2019-02-02T13:55 as output. As because of this my conversion function is throwing error!!
SimpleDateFormat ...
0
votes
1
answer
1k
views
java.text.ParseException: Unparseable date: "04-02-2019"
First of all , i know there are lots of questions regarding my same problem.But that was not enough to solve my problem.So if anyone can provide anything then it would be great.
In my term the date ...
0
votes
2
answers
339
views
java: ParseException: Unparseable date [duplicate]
i have a SimpleDateFormat format = new SimpleDateFormat("d M y H:m"); and i try to parse the String "8 Jan 2019 16:47" with it, but i get a ParseException. Did i create it the wrong way?
According to ...
0
votes
0
answers
309
views
SimpleDateFormat parse doesn't work on Date in UTC format from database
I use Parse.com and each ParseObject has date column with Date type in UTC format.
I want to sort those object which I get from query by date. So I'm using SimpleDateFormat and Comparator to compare ...
0
votes
4
answers
2k
views
Getting ParseException when running Hive query
I'm trying to find the number of employees who are paid less than average wage.
I'm pretty new to hive and struggling a bit, could someone explain whats wrong with my statement and help me out please?...
0
votes
1
answer
2k
views
org.threeten.bp.format.DateTimeParseException: Text '2018-07-22T14:00:00-03:00' could not be parsed at index 19
public static String formatter(String dateInPattern, String dateOutPattern) {
OffsetDateTime dateInPatternFormat = OffsetDateTime.parse(dateInPattern, DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:...
3
votes
2
answers
31k
views
SQL code error mismatched input 'from' expecting
Hi below is my SQL code and it gives me error and I do not know why. If anyone can help.
select time_dif, count(time_dif) as count
from
(
select datediff(so_so_close_time,date_closed) as time_dif
...
0
votes
2
answers
299
views
SimpleDateFormat Parsing on Android [duplicate]
I am trying to parse the following date/time:
Wed, 29 Aug 2018 12:56:00 +0200
Currently, I am using the following code which works on my Android emulator but on my actual phone I get a "java.text....
0
votes
1
answer
406
views
android - com.parse.ParseRequest$ParseRequestException: bad json response
I am using Parse with Heroku in my application. But I am getting the error, com.parse.ParseRequest$ParseRequestException: bad json response.
i did a lot of research, and found that some people had ...
-3
votes
1
answer
424
views
ParseException when using SimpleDateFormat.parse("yyyy-MM-dd")
My code looks as follows:
(new SimpleDateFormat("yyyy-MM-dd")).parse("0000-12-25")
This argument is supposed to pass a date object to a constructor, but I get a ParseException. I tried playing ...
0
votes
0
answers
47
views
How to parameterise a command invocation inside a script block? [duplicate]
I am trying to write a PowerShell script with a Script Block that is to be passed to Invoke-Command. The script block needs to invoke an executable whose path is determined by a PowerShell variable ($...
0
votes
2
answers
715
views
Not able to convert the string to date on Android
I have obtained a string from an API in form of 2017-04-23T19:47:39+00:00
How do i convert it into date of format "2017-04-23T19:47:39-0000"?
I tried the following but it gave ParseException
String ...
-3
votes
1
answer
1k
views
Is ParseException only thrown for conversion from string to date?
I'm trying to become clear about ParseException. Its example focus is "convert from string to date", and I also found:
This is a checked exception and it can occur when you fail to parse a
String ...
8
votes
7
answers
59k
views
How to convert UTC Date String and remove the T and Z in Java?
Am using Java 1.7.
Trying to convert:
2018-05-23T23:18:31.000Z
into
2018-05-23 23:18:31
DateUtils class:
public class DateUtils {
public static String convertToNewFormat(String dateStr) ...
0
votes
0
answers
67
views
Why is ParseException shown for SimpleDateFormat even when correct pattern is followed?
Inside a jsp file, I have passed an element of input type="date" and I want to insert that element to the column of type Date inside the database.
When I pass this,
<input type="date" class="well ...