Viewing contents of file '../idllib/astron/contrib/varosi/code/allpro/date_time.pro'
;+
; NAME:
;	date_time
; PURPOSE:
;	Convert integer day, month, year, hour, minutes, seconds, into strings.
; CALLING:
;	date_time, info, date, time
; INPUTS:
;	info = structure with tags containing header information.
; OUTPUTS:
;	date = string array of month/day/year.
;	time = string array of hour:minute:second.
;	ymd = string array of year/month/day.
;	ymd_hms = string array of year/month/day-hour:minute:second.
; HISTORY:
;	Written, Frank Varosi NASA/GSFC 1996.
;-

pro date_time, info, date, time, ymd, ymd_hms

	date = strmid( strtrim( info.month + 100, 2 ), 1, 2 ) + "/" + $
		strmid( strtrim( info.day + 100, 2 ), 1, 2 ) + "/" + $
		strmid( strtrim( info.year, 2 ), 2, 2 )

	if N_params() LE 2 then return

	time = strmid( strtrim( info.hour + 100, 2 ), 1, 2 ) + ":" + $
		strmid( strtrim( info.minute + 100, 2 ), 1, 2 ) + ":" + $
		strmid( strtrim( info.second + 100, 2 ), 1, 2 )

	if N_params() LE 3 then return

	ymd = strtrim( info.year, 2 ) + "/" + $
		strmid( strtrim( info.month + 100, 2 ), 1, 2 ) + "/" + $
		strmid( strtrim( info.day + 100, 2 ), 1, 2 )

	if N_params() LE 4 then return

	ymd_hms = ymd + "-" + time
end