473,385 Members | 1,465 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

conversion of ddate to seconds

10
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.
Mar 24 '08 #1
1 2068
gpraghuram
1,275 Expert 1GB
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
Mar 31 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

10
by: point | last post by:
Hi... I have this format 2003-12-01 18:46:20.0 And would like it to be 01-12-2003 18:46:20 I know it can be done vis string cuts and explodes but ther's got to be a better way using time...
4
by: flupke | last post by:
Is there an easy to convert following hour notation hh:mm to decimals? For instance 2 hours and 30 minutes as 2:30 to 2,50 I don't really know where to search for this kind of conversion. ...
4
by: Kiran | last post by:
Hi Folks, Please advise me on the conversion of EpochSeconds to DD-MMM-YYYY format in c#. given are the few examples. 1093128564 1093128537 1093128419
20
by: Rio Liaden | last post by:
In another post requiring conversion, I could see how you helped the person, but my field is a bit different and I do not code well. My field is on a report and reads: =Sum(). It is comprised of...
3
by: moni | last post by:
Hi, I wanted to convert a time value in the form of time_t into a readable form in C# or vice versa, in order to be able to subtract two time values and give the result in msecs. eg. I...
3
by: moni | last post by:
This is all in C: I have 2 time values: System time and an input from the user. 1) System time is in the form of seconds from 1/1/1970 calculated by using time_t secs;
4
by: Terry | last post by:
I have x as double, hh as int32 in VBA I can perfom hh=Int(x) (narrowing conversion but disallowed in .NET) One example in .NET is hh = System.Convert.ToInt32(x) Could I use IConvertible and...
15
by: bcpkh | last post by:
Hello All I have a simple task that is driving me crazy. A string representing a duration in the following format is passed to my application, a function is dedicated to convert this duration to...
19
by: DonLi2006 | last post by:
Hi, ddl & dml project varchar(10) start char(5) stop char(5) ------------------------- ----- ----- hey now 21:00 19:25 new test 20:25 20:30 t 10 ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.