Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Date format from Jan 01 2015 11:00:00 PM to 01/01/2015 23.00.00 Post 302943601 by esivaprasad on Monday 11th of May 2015 04:29:13 AM
Old 05-11-2015
Date and time formats

Thanks for quick responce.


Data is availble in .txt files, using .txt files to load data into database.
when data loading into Database, we are cnverting date and time formats using Datbase functions.
It 's taking long time to convert date and time to Datatbase default fomat.
so we are planing to convert the data in file level then load data into Database.

Have space between Day and year.

Data in files:

File1 :
Code:
Richard|Standard | Not asigned| Insured | New York |  Jan 01  2015 11:00:00 PM
John | Not Standard |  asigned| Insured | New York |  Jan 01  2015 11:00:00 PM
James | No| Assigned| No| New york |  Jan 01  2015 11:00:00 PM

File 2":
Code:
Richard|Standard |Nov 01 2014 10:00:00 PM| Not asigned| Insured | New York |  Jan 01  2015 11:00:00 PM
John | Not Standard | Jan 05 2014 11:00:00 PM|  asigned| Insured | New York |  Jan 01  2015 11:00:00 PM
James | No|Sep 01 2014 10:00:00 AM| Assigned| No| New york |  Jan 01  2015 11:00:00 PM

Moderator's Comments:
Mod Comment
Please wrap all code, files, input & output/errors in CODE tags.
It makes them easier to read and preserves multiple spaces, wich can be critical for fixed width data.

Last edited by rbatte1; 05-11-2015 at 10:35 AM.. Reason: Added CODE tags and moderator comment.
 

6 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

perl one-liner to get yesterday's date in format dd-MMM-yy (i.e. 01-JAN-12)

I have the following perl one-liner to get yesterday's date, but I would like it in the form of dd-MMM-yy (for example: 01-JAN-12). Can someone alter the below code so I get the format I want? Also, could someone also give me a line for dd-Mmm-yy (for example 01-Jan-12)? Code: YEST=`perl -w... (3 Replies)
Discussion started by: thibodc
3 Replies

2. Shell Programming and Scripting

How to convert date format such as 7/18/2015 to the number of month

How to convert date format such as 7/18/2015 to the number of month from requesting date 'date' in sh scripting ? Let say I have output in my log.txt -> 7/18/2015. How I convert it to the full number of month starting from 'date' till 7/18/2015 in shell scripting ? Thanks in advance. (1 Reply)
Discussion started by: amerabest
1 Replies

3. What is on Your Mind?

While Happy; do @ ;done < 2015

http://i62.tinypic.com/zt6a08.jpg (2 Replies)
Discussion started by: ongoto
2 Replies

4. Solaris

Leap second for year 2015

I hear the Leap second for 2015 will occur on June 30 at 23:59:60 according to the wild rumours from internet the expected impact ranges from crashing to hanging servers. Can anybody share their preparations what they have done for solaris servers? are there any patches to install or workaround?... (1 Reply)
Discussion started by: sparcguy
1 Replies

5. What is on Your Mind?

LinuxCon Seattle 2015

Only a little over a week until I head out to LinuxCon in Seattle. Anyone else attending this year? (0 Replies)
Discussion started by: Gallavin
0 Replies

6. SCO

Strange behaviour on Openserver 5.0.2 after 09/2015

Dear friends, i am having some Problems with a Sco Openserver in a Box (normally on VMWare, importing it on a Virtualbox does the same). When i boot up the system on xx/09/2015 i got fork failed - too many processes during startup. The programs which should run on the server, do not run. I... (67 Replies)
Discussion started by: ChipperEs
67 Replies
sttime(3)						    ShapeTools Toolkit Library							 sttime(3)

NAME
stMktime, stWriteTime - date and time handling SYNOPSIS
#include <config.h> #include <sttk.h.h> time_tstMktime (char *string); char*stWriteTime (time_t date); DESCRIPTION
stMktime scans the given string and tries to read a date and time from it. It understands various formats of date strings. The following is a list of all valid formats, optional parts in brackets. [Tue] Jan 5[,] [19]93 This includes the standard asctime(3) format. Jan 5 With no year given, the year defaults to the current year. [19]93/01/05 This notation requires month and day represented by exactly two digits. 5.1.[19]93 This is the usual German notation. 5.1. German notation referencing the current year. A certain time, given together with the date must always have the following form. hours:minutes[:seconds] Each of the fields must be an integer value within the proper range (hours: 0-23, minutes and seconds: 0-59). Values below 10 may be written as one digit numbers. The time value may be placed anywhere in the date string: at the beginning, at the end, or somewhere in the middle. Any amount of white- space may be given between a field of the time value and the separating colon. The time is always considered to be local time. stWriteTime generates a time string similar to asctime(3) from its date argument. SEE ALSO
asctime(3) BUGS
Time Zone Names within the time string (like `MET') are not handled properly. In most cases they will cause a failure. sttk-1.7 Thu Jun 24 17:43:35 1993 sttime(3)
All times are GMT -4. The time now is 12:39 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy