Sponsored Content
Top Forums Shell Programming and Scripting Convert Epoch time format to normal date time format in the same file Post 302260078 by fpmurphy on Wednesday 19th of November 2008 04:00:05 PM
Old 11-19-2008
Another way would be to use gawk i.e.
Code:
gawk 'BEGIN { FS=","; OFS="," } {$7=" \47time\47: "strftime("%a %b %d %T", substr($7,10,10)); print }' file

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how to convert epoch time to readible format?

Hi, I would like to convert epoch time from the logs to readible fromat. How do I do it within shell? Thanks! (11 Replies)
Discussion started by: cin2000
11 Replies

2. Shell Programming and Scripting

Convert Epoch Time to Standard Date and Time & Vice Versa

Hi guys, I know that this topic has been discuss numerous times, and I have search the net and this forum for it. However, non able to address the problem I faced so far. I am on Solaris Platform and unable to install additional packages like the GNU date and gawk to make use of their... (5 Replies)
Discussion started by: DrivesMeCrazy
5 Replies

3. Shell Programming and Scripting

how to convert date time to epoch time in solaris

Hi, Is there any easy way to convert date time(stored in shell variable ) to epoch time in solaris box? As +%s is working on linux but not on solaris, also -d option is not working. Any suggestion please? (6 Replies)
Discussion started by: anshuman0507
6 Replies

4. UNIX for Dummies Questions & Answers

getting the current time in Epoch format

Hi everybody, I want to get the current time in epoch format (in UNIX or Korn Shell) and store it in a variable called currentTime. Any response will be highly appreciated:) Thanks in advance, omoyne:D (8 Replies)
Discussion started by: omoyne
8 Replies

5. Shell Programming and Scripting

Need to convert an epoch date to MMDDYYHHmm format

System: HP-UX Kornshell Perl is installed, but not POSIX Hello, I am calculating a future date/time. To do this I take the system date in epoch format and add to it. I now need to take the new epoch date and convert it to MMDDYYHHmm format. Any help with this is greatly appreciated. (4 Replies)
Discussion started by: LetsGoPens
4 Replies

6. Shell Programming and Scripting

Convert epoch to human readable date & time format

Hello I have log file from solaris system which has date field converted by Java application using System.currentTimeMillis() function, example is 1280943608380 which equivalent to GMT: Wed, 04 Aug 2010 17:40:08 GMT. Now I need a function in shell script which will convert 1280943608380... (3 Replies)
Discussion started by: Yaminib
3 Replies

7. Shell Programming and Scripting

Using awk or nawk to convert epoch time to date format

Looking for some help and usually when I do a search this site comes up. Hopefully someone can give me a little direction as to how to use one of these two commands to achieve what I'm trying to do. What am I trying to do? I need to take the time value in epoch format returned from the... (5 Replies)
Discussion started by: minigts
5 Replies

8. Shell Programming and Scripting

converting epoch time to ddmmyy format

I can not find a working script or way to do this on sun solaris , can someone please guide me? e.g 1327329935 epoch secs = 012312 (ddmmyy) thanks (5 Replies)
Discussion started by: aliyesami
5 Replies

9. Shell Programming and Scripting

Convert epoch time to Julian date

Need assistance in converting an epoch time to Julian date To get epoch perl -e 'use Time::Local; print timelocal(1,5,2,12,10,2008), "\n"' (3 Replies)
Discussion started by: ajayram_arya
3 Replies

10. Shell Programming and Scripting

Convert epoch time stamp into human readable format

Can someone help me to write a shell script to convert epoch timestamp into human readable format 1394553600,"test","79799776.0","19073982.728571","77547576.0","18835699.285714" 1394553600,"test1","80156064.0","19191275.014286","62475360.000000","14200554.720000"... (10 Replies)
Discussion started by: Moon1234
10 Replies
PX_DATE2STRING(3)					     Library Functions Manual						 PX_DATE2STRING(3)

NAME
PX_date2string -- Convert paradox date into formated string SYNOPSIS
#include <paradox.h> char * PX_date2string(pxdoc_t *pxdoc, long date, const char *format) DESCRIPTION
Creates a string representation of a paradox date as specified in the parameter format. The date must be either retrieved with PX_get_data_long(3) after calling PX_get_record(3) or by simply using the long value in the pxval_t struct as returned by PX_retrieve_record(3). The function uses internally the PX_timestamp2string(3) function. The format string may contain all chars as docu- mented with PX_timestamp2string(3), though only those concerning the date will produce resonable results. RETURN VALUE
Returns pointer to string on success and NULL on failure. SEE ALSO
PX_timestamp2string(3), PX_time2string(3) AUTHOR
This manual page was written by Uwe Steinmann uwe@steinmann.cx. PX_DATE2STRING(3)
All times are GMT -4. The time now is 05:55 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy