conversion of ddate to seconds

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Manogna
    New Member
    • Jan 2008
    • 10

    conversion of ddate to seconds

    hi! all,

    mine is a Free bsd system.

    I want to convert the date to seconds.
    i used the date +%s command for conversion. but in that it converting the date in seconds including the week.

    My date is as in the formte " Mar 17 10:10:10 2008" . how to convert this to seconds by date command?

    and how to convert the seconds in this formate by date command?

    and how to change the current date in seconds without the week(i.e for ex like Thu , Fri etc)?

    plz give ur valuable thoughts for me,

    thanks and regards,
    Manogna.
  • gpraghuram
    Recognized Expert Top Contributor
    • Mar 2007
    • 1275

    #2
    Originally posted by Manogna
    hi! all,

    mine is a Free bsd system.

    I want to convert the date to seconds.
    i used the date +%s command for conversion. but in that it converting the date in seconds including the week.

    My date is as in the formte " Mar 17 10:10:10 2008" . how to convert this to seconds by date command?

    and how to convert the seconds in this formate by date command?

    and how to change the current date in seconds without the week(i.e for ex like Thu , Fri etc)?

    plz give ur valuable thoughts for me,

    thanks and regards,
    Manogna.

    By seconds did you mean the Unix Tick count?
    If yes then you can get is by the following option
    date +%u --date="yymmdd"

    Raghuram

    Comment

    Working...