new Date() to Julian date format in java

前端 未结 3 1762
余生分开走
余生分开走 2021-01-29 16:00

I need to convert new Date() to Julian date format.is there is any build in java function for this. my exact requirement is

Represents the creation date of the file in

3条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-29 16:28

    Use SimpleDateFormat.

    The following code returns the Julian date string for date according to the format you gave.

    String julianDateString = new SimpleDateFormat("'0'yyD").format(date);
    

提交回复
热议问题