我是靠谱客的博主 包容冰淇淋,这篇文章主要介绍ES时间格式化问题,现在分享给大家,希望可以做个参考。

 /**
     *20210412T154552.611Z
     */
    @Field(type = FieldType.Date, format = DateFormat.basic_date_time)
    private LocalDateTime newDate1;

    /**
     * 2021-04-12T15:45:52.611Z
     */
    @Field(type = FieldType.Date, format = DateFormat.date_time)
    private LocalDateTime newDate2;

    /**
     * 2021-04-12T15:45:52Z
     */
    @Field(type = FieldType.Date, format = DateFormat.date_time_no_millis)
    private LocalDateTime newDate3;

    /**
     * 2021-04-12 15:45:52
     */
    @Field(type = FieldType.Date,format = DateFormat.custom,pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime newDate4;

    /**
     * 20210412T074552.611Z
     */
    @Field(type = FieldType.Date, format = DateFormat.basic_date_time)
    private Date oldDate1;

最后

以上就是包容冰淇淋最近收集整理的关于ES时间格式化问题的全部内容,更多相关ES时间格式化问题内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(113)

评论列表共有 0 条评论

立即
投稿
返回
顶部