Skip to content
This repository was archived by the owner on Mar 24, 2025. It is now read-only.
This repository was archived by the owner on Mar 24, 2025. It is now read-only.

Setting Timestamp Format as an Option #519

@mahkhalil

Description

@mahkhalil

Hi,

Is there a way to set the timestamp format as an option, like we do in reading the csv files, the timestampFormat option?

I've tried setting it using the following code

spark.read
      .option("rowTag", "row")
      .option("timestampFormat", "dd-MM-yyyy")
      .schema(schema)
      .xml("test.xml").show()

But it always returns null in the Timestamp field. Also, I've tried searching for a method representing that option in the XMLReader but I couldn't find any.

It would be really great if you could add setting the timestamp as an option while reading the XML files, if it's not already there :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions