Programming :: Datetime Format From MM-DD-YYYY HH:MM:SS To YYYY-MM-DD HH:MM:SS

Oct 13, 2010

I need to manipulate a column in a log file from the following format:

Prior to importing to a mysql database.

Unfortunately, I am not able to configure the device which is sending the logs to use the correct standard datetime format.

View 4 Replies


ADVERTISEMENT

Programming :: Convert From DD/MM/YYYY To YYYYMMDD?

Jun 6, 2011

How does one convert from DD/MM/YYYY to YYYYMMDD?

Code:
06/06/2011
06/06/2011

to

Code:
20110606
20110606

View 6 Replies View Related

General :: Simple Script To Convert Datetime Format To UTC Format?

Oct 9, 2009

just wondering is there a simple script to convert datetime to UTC format. I have been searching different forums but most answers are for converting UTC to datetime. For example what is a simple command/script to convert todays datetime to UTC format i.e. '2009-10-09 11:47:59'.

View 10 Replies View Related

Programming :: Formatting A Datetime String - In G++ ?

Jul 10, 2011

I copied and tested a piece of simple formatting a datetime string code from book, c++ cookbook, page 201, Chapter5 section2, Example5-4. but it wont compile in my g++ 4.5.2(on ubuntu 10.04, kernel2.6.35-25)

Example 5-4 formatting a datetime string

Using namespace std;

View 1 Replies View Related

Programming :: ImportError: No Module Named Mx.DateTime.ISO

Sep 9, 2010

In Python 2.6.5, I could import from mx.DateTime.ISO import ParseDateTimeUTC With 2.7 I cannot.Here is the error. My module util_lib contains the import noted above.

File "util_lib.py", line 46, in <module>
from mx.DateTime.ISO import ParseDateTimeUTC
ImportError: No module named mx.DateTime.ISO

What changes do I need to make, to import on pre-2.7 and 2.7?

View 2 Replies View Related

Programming :: Parsing Datetime Domain Names

Oct 25, 2010

I have spent lots of time trying to figure out how to parse the domain part of this file but am stuck.

How should this be approached:

Code:

Code:

The domains need to be parse at a maximum for 4 levels then the remainder will be put the last field.

View 3 Replies View Related

Programming :: Removing Duplicates With Offset - Datetime

Oct 20, 2010

I have a column of datetime entries which I sorted to removed duplicate entries.

I have still lots of entries which are adjacent to each other by 1 second.

How would I go about removing any entries which have an offset of the previous or after entry by 1 second?

Code:

View 5 Replies View Related

General :: Kernel Programming - Convert Timespec To Datetime

Dec 29, 2010

I'm changing some syscalls functions into kernel 2.6.36.2

So i'm doing this :

Code:

But i have a output like this : Date 1293619251

How can i convert inode->i_atime into D:M:Y h:m Format?? or just simply D:M:Y

View 1 Replies View Related

Programming :: Match Datetime By The Minute (not An Exact Match By The Second)

Oct 21, 2010

I have the following query:

Code:
$sql="SELECT table1.datetime, table1.user_id, table2.ip, FROM table1,table2 WHERE id='$id' AND (table1.id = table2.id AND table1.datetime = table2.datetime)";

In table2 the datetime fields are about 1 to 2 seconds off due to the source of the data, which I cannot change.

Is it possible via a query match table1.datetime & table2.datetime by HH:MM (ie. to the minute instead of to the second)?

View 1 Replies View Related

Slackware :: Current: Perl 5.14.0 - DateTime

May 28, 2011

I updated to current, which includes perl 5.14.0. In updating to the latest DateTime module (0.70) via cpan, I receive this:

Code:

Lots of them. The same error occurs when 'make test'ing manually from the DateTime tarball. I see that DateTime 0.70 has been reported to be OK with 5.14.0 on linux (in fact, there are no fails for it). I uninstalled perl, removed all the perl5 directories, reinstalled it, upgraded all the default modules. DateTime still fails like this. Maybe current's perl has been compiled with different options?

View 14 Replies View Related

Ubuntu :: Command / Script To Rename Files In Datetime Order?

Jun 1, 2010

I'm trying to rename all files in a folder as such:

1.jpg
2.jpg
3.jpg

Renaming them is no problem, the problem I have is, they need to be in order of the datetime that they were taken, so that the 1.jpg would be the oldest file there. The difference in filetimes is going to be very small, around 3 or 4 tenths of a second.

The reason I need to do this is that I have another script (not quite finished yet), that takes the next three files in a loop and applies qtpfsgui to them to output an HDR image to another folder, then move on to 4,5 & 6, and: repeat.

View 9 Replies View Related

Programming :: Awk: How To Keep The Format Of The Record

Apr 5, 2010

In /etc/fstab, I have a record:LABEL=/< >/< >ext3< >default,nolog< >1 1 represent a tab between 2 fieldsI just want to remove "nolog" in the 4th field (only): gsub(/nolog/,"",$4)The function work ok but it returns a record:LABEL=/ / ext3 default 1 1I know the problem is OFS=" ", but how can I keep the format of the record? (the same number of tabs, spaces).

View 5 Replies View Related

Programming :: Best Way To Transform XML Format?

Sep 10, 2010

I'm looking for some expert opinion on sed/script to work out the best way to transform one xml format into another however there are a few complexities around translation.

The extra complexities are to:
1) Take the start and stop time (YYYYMMDDHHMMSS) and convert to start time to unix time plus output the difference in seconds between both times.
2) Oid, tsid and sid are found by looking up an external file and finding the value against the channel. For example one of the lines in the file will be 2:806:27e2=channel1

Is there any way to write piped sed commands that can do this? If not, any ideas how the script should look like?

Input File
Code:
<programme start="20100910060000 +0100" stop="20100910061000 +0100" channel="channel1">
<title lang="en">This is the title</title>
<desc>This is the description</desc>
</programme>
Output File

Code:
<service oid="0002" tsid="0806" sid="27e2">
<event id="0">
<name lang="OFF" string="This is the title"/>
<text lang="OFF" string="This is the description"/>
<time start_time="1284098400" duration="600"/>
</event>
</service>

Look up file for oid, tsid and sid
Code:
2:806:27e2=channel1
2:756:37a3=channel2
5:4a06:42e5=channel3

View 8 Replies View Related

Programming :: Format Int 1 To String 0001 In C++?

Feb 16, 2011

In C++ as subjected, can anyone throw me some light on how I can generic-ly format an integer value of 1 to a string value of 0001? 11 to 0011? and 111 to 0111? simply by just appending 0 in front and limiting the length of the string to 4?

View 4 Replies View Related

Programming :: Scan In A File Which Has The Format?

Apr 3, 2011

I am trying to scan in a file which has the format of

Quote:
username:password
hello:world
right now my program says
Code:
Scanner fin = null;
try
{
fin = new Scanner(new FileReader("proj1/passwd.txt"));

[Code]...

How do i correctly use delimiter to take in only the strings on one line?

View 1 Replies View Related

Programming :: Sed - Series Of Files In The Format

Sep 21, 2009

I have a series of files in the format:


Which I'm trying to split using sed to have each field/value pair on on line:

So far so simple, but some of the values might have commas in them, which means they'll be split up. Is there a way to change this so that only commas not within quotes will be replaced with ? (e.g. make sed count number of " and if it finds a , after counting an odd number of " then ignore it?)

View 2 Replies View Related

Programming :: Curl: (3) URL Using Bad/illegal Format Or Missing URL

Feb 16, 2011

What is the problem? I receive this message (see in red) when i running this script (below) on bash script file:

error received:

% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 70 0 70 0 0 321 0 --:--:-- --:--:-- --:--:-- 0
IMAG_DOS.ZIP

[code]....

View 1 Replies View Related

Programming :: Get System Uptime In YYMMDD Format?

Feb 22, 2010

language: cOs: ubuntu 9.10 want a c or c++ program that gives the system uptime in YYYY: MM: DD HH : MM: SS format.eally it is head ditching..This is not home work or assisgnment..

View 10 Replies View Related

Programming :: IEEE Floating Point Format?

Jun 5, 2011

I'm reading a book on assembly, and it talks a bit about the IEEE floating point format.

Quote:

To summarize, the following steps are used to convert a decimal number to IEEE single format: 1. The leading bit of the floating point format is 0 for a positive number and 1 for a negative number. 2. Write the unsigned number in binary. 3. Write the binary number in binary scientific notation f23.f22 ... f0 2^e, where f23 = 1. There are 24 fraction bits, but it is not necessary to write trailing 0's. 4. Add a bias of 127 to the exponent e. This sum, in binary form, is the next 8 bits of the answer, following the sign bit. (Adding a bias is an alternative to storing the exponent as a signed number.) 5. The fraction bits f22f21 ... f0 form the last 23 bits of the floating point number. The leading bit f23 (which is always 1) is dropped.

View 1 Replies View Related

Programming :: Reading A Simple File Format In C?

Dec 16, 2010

I made a string key-value mapping struct in C, and functions to add and remove entries. I would also like to write a function to read in this file format:

Code:
key: value
another: another value

[code]...

View 14 Replies View Related

Programming :: Change Data Format In A File Using Bash?

Mar 24, 2010

I want to change data format in a file using bash. The orignal is like:

Code:
1 abc 6 pqr
2 def 7 stu
3 ghij 8 vwx
4 kl 9 yz

[Code]....

View 9 Replies View Related

Programming :: Format Of Realmode Interrupt Return On Stack?

Apr 10, 2010

What is the realmode interrupt return on the stack. Is it pop AX pop CS or vice versa?

View 4 Replies View Related

Programming :: Produce COFF Format Object File Using GCC Or AS?

May 10, 2010

I am trying to have GNU assembler produce object file COFF format? I did not find relevant information from GNU assembler's manual.

View 1 Replies View Related

Programming :: How To Save Text Data In Binary Format Using C

Feb 20, 2010

I have created a file using open() and written data to it. Data appears as normal characters in the file. How to save these characters in a binary format in that file using C language? Here I mean that the characters should be actually stored as 0 and 1. Do I have to convert the whole data using some function or there is some standard way to do it in Linux?

View 14 Replies View Related

Programming :: Getting An Undefined Offset For The Associative Arrays [28-46] In Format

Dec 8, 2010

i'm getting an undefined offset for the associative arrays [28-46] in this format.

[Code]....

i have read that i can prevent the notices by doing the following, but it's not working for me

PHP Code:

[Code]....

View 5 Replies View Related

Programming :: String Format - Create A Text File ?

Feb 3, 2010

I am using C. I have a fuction that returns a string

Code:

I need to format this string so that I can create a text file like so:

So I'm trying:

Code:

But I get errors like:

View 2 Replies View Related

Programming :: Free Open Source CSV Format Parsing Software

Jun 1, 2011

Google directed me to the ones written in .Net/C# etc. Any ideas on the ones written in C/C++?

View 14 Replies View Related

Programming :: Converting Date Format In A Comma Separated Field?

Apr 9, 2010

I am in the process of learning some scripting, however I am running into a roadblock in specifying a certain time format in the array. Ideally I would like to use Here are the lines of text that I am interrogating:

1123,3/25/2010,00:14 Thu,33229
1124,3/26/2010,13:30 Fri,33230
1125,3/27/2010,04:49 Sat,33231

[code]...

View 2 Replies View Related

Programming :: Writing A Renaming Script (DDMMYYYY To YYYYMMDD Format)?

Jan 15, 2010

I have a load of photos from my old Nokia phone that I need to rename. A few examples of the current format is "ddmmyyyy.jpg", "ddmmyyyy(001).jpg", "ddmmyyyy(002).jpg" etc, where ddmmyyyy is the date.I need to rename hundreds of files in a single directory so that the first 8 digits are rearranged into "yyyymmdd.jpg", "yyyymmdd(001).jpg" format etc.Even better if the output format could be "yyyy-mm-dd_(001).jpg"

View 5 Replies View Related

Programming :: Getting A Open Source Sound File Format For Bitwise Editing?

Feb 19, 2011

I was wondering, what would be a good, open-source file format for a beginner in the field, like me, to start editing sound files? This file format would have to be well documented, preferibly open-source, lossless and, most of all, convertible to more popular file formats, such as mp3 or wav maybe. I would like to design my own sound effects through directly editing the binary sequence of a sound file. I imagine this editing would have the purpose of adjusting the voltage variations of the sound device's output in time. It would be perhaps something like a PC-controlled signal generator. I'm thinking I might be able to do this in linux with something like

Code:

$ dd if=mysound.raw of=/dev/audio

But then, which book or resource woule be a good and through explenation of the relationship between the bit sequence in mysound.raw and the signal function generated in the output of, say, my computer's sound card.

View 10 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved