The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
epoch time in shell script robsonde SUN Solaris 14 05-12-2009 12:08 PM
EPOCH to real time? TheEngineer UNIX for Advanced & Expert Users 5 07-18-2006 08:30 AM
Epoch time 12yearold UNIX for Advanced & Expert Users 2 07-14-2006 03:11 PM
Epoch time 12yearold Shell Programming and Scripting 1 07-14-2006 11:57 AM
how to convert epoch time to readible format? cin2000 Shell Programming and Scripting 11 12-19-2005 07:14 PM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 06-02-2008
ali560045's Avatar
ali560045 ali560045 is offline
Registered User
  
 

Join Date: Oct 2007
Posts: 328
epoch time

Hi,

i need to convert below date/time format into epoch time

YYYY-m-d H:M

below the example:

a=`date +"%F %H:%M"`
echo $a
Convert $a to epoch time
------------------------------------------------------------------------
lets take an example
if $a=1.03

here i want the epoch time of hour and mins only.
so the epoch time should be of 1 hour 3mins.

----------------------------------------------------------------------

help me in this

i can use
b=`date '+%s'`
echo $b
but it will give me the time of 1.03.10,lets for example. i want seconds of 1.03 and not 1.03.10

------------------------------------------------------

Last edited by ali560045; 06-02-2008 at 02:50 AM..
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 04:39 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0