473,386 Members | 1,785 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,386 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 2069
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 ...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.