Java LocalDateTime Format convertTemporalToSplunkSearchFormat(OffsetDateTime localDateTime)

Here you can find the source of convertTemporalToSplunkSearchFormat(OffsetDateTime localDateTime)

Description

convert Temporal To Splunk Search Format

License

Apache License

Declaration

public static String convertTemporalToSplunkSearchFormat(OffsetDateTime localDateTime) 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.time.*;
import java.time.format.DateTimeFormatter;

public class Main {
    public static DateTimeFormatter TIME_SPLUNK_SEARCH_FORMATTER = DateTimeFormatter
            .ofPattern("MM/dd/yyyy:HH:mm:ss");

    public static String convertTemporalToSplunkSearchFormat(OffsetDateTime localDateTime) {
        return TIME_SPLUNK_SEARCH_FORMATTER.format(localDateTime);
    }//from w w w .j  ava2 s . co m
}

Related

  1. convertDateStringToLocalDateTime(String formattedValue, int hour, int minute)
  2. format(LocalDateTime dateTime)
  3. format(LocalDateTime localDateTime, String pattern)
  4. formatDate(LocalDateTime dateTime)
  5. formatDate(String inPattern, LocalDateTime inTime)