Sponsored Content
Full Discussion: date conversion
Top Forums Shell Programming and Scripting date conversion Post 302179903 by charandevu on Saturday 29th of March 2008 02:59:24 AM
Old 03-29-2008
date conversion

file1
E106,0,1/9/1993,0,E001,E003,A,45200,3766.667,21.730769
E108,0,2/3/1995,0,E001,E003,A,15000,1250,7.211538
E109,0,06-mar-07,0,E001,E001,A,78000,6500,37.5
E110,0,09-dec-2008,0,E001,E001,A,56000,4666.667,26.923077
E104,0,06/04/1994,0,E001,E003,A,95000,7916.667,45.673077
E105,0,7/30/1993,0,E001,E003,A,87000,7250,41.826923
E106,0,1/9/1993,0,E001,E003,A,45200,3766.667,21.730769
E108,0,01-feb-2008,0,E001,E003,A,15000,1250,7.211538
E109,0,2/15/1995,0,E001,E001,A,78000,6500,37.5

I want to convert the date format to yyyymmdd for a every line in a file.

Please let me know on this....


Thanks in advance
cherry
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Date Conversion

Hello, I want to convert MM DD YYYY date format to MM-DD-YYYY format. For exemple: I have to convert Nov 28 2005 to 28-11-2005. Thenks for youf help. DAFI (2 Replies)
Discussion started by: dafidak
2 Replies

2. Shell Programming and Scripting

date conversion

Hi everybody: Could anybody tell me how I convert from a julian date, with shell comands, to gregorian. Thanks in advance. (2 Replies)
Discussion started by: tonet
2 Replies

3. Shell Programming and Scripting

Date Conversion

Hi, Does anyone know (in KSH, CSH, SED or AWK), how to convert date text in a file from: EX: May232008 to: 05232008 Thanks, (3 Replies)
Discussion started by: jgrant746
3 Replies

4. Shell Programming and Scripting

Date conversion

Hi I want to convert MAY 05 2005 01:15:00PM date format to 2005/05/05 01:15:00PM . CAn somebody suggest me a code ,I am new to unix shell programming. Thanks Arif (21 Replies)
Discussion started by: mab_arif16
21 Replies

5. Shell Programming and Scripting

Date conversion

Hi, I have the string YYYYMMDDHHMMSS like 20090801204150 and I need to convert it using the unix command date in the format: date "Saturday, 1 August 2009 20:40:59" All in one single Unix line if this is possible. What's the correct syntax? Steve Hagi (6 Replies)
Discussion started by: hagimeno
6 Replies

6. Shell Programming and Scripting

Conversion of date to Julian date

Hi Gurus, Need help in Conversion of date(2007-11-30) to Julian date(YYDDD)... '+%J' 2007-11-30 to 'YYDDD' Thanks (4 Replies)
Discussion started by: SeenuGuddu
4 Replies

7. UNIX for Dummies Questions & Answers

Date conversion in ab i

(string(8)) ((date("YYYYMMDD")) ((date("YYYY/MM/DD")) in.date_field_name)) (1 Reply)
Discussion started by: dr46014
1 Replies

8. Shell Programming and Scripting

Julian date to Calendar date conversion

Hi all, I require to convert julian date to normal calander date in unix for eg julian date=122 now i want corresponding calander date ---------------------------------------- gr8 if give very small command/script and please explain the steps as well(imp) Thanks ... (3 Replies)
Discussion started by: RahulJoshi
3 Replies

9. Shell Programming and Scripting

Date conversion

Trying to convert dates using a Perl Script but it has to accept formats like 3 letter month, day and year like Nov 02 2010 or 1/4/11 or 21 Feb 2011 and have it convert to something like October 20, 2011. Any ideas? (2 Replies)
Discussion started by: reduxeffect81
2 Replies

10. UNIX for Beginners Questions & Answers

Date conversion

Hi , we have a string with yyyymmdd format . how to know which date it is ? example:20120712-->sunday 20150228-->saturday 20140431-->invalid please suggest commands which work on below os : SunOS 5.10 shell: bash shell Thanks, Srinath. (10 Replies)
Discussion started by: srinadhreddy27
10 Replies
Business::EDI::Spec(3pm)				User Contributed Perl Documentation				  Business::EDI::Spec(3pm)

NAME
Business::EDI::Spec - Object class for CSV-based U.N. EDI specifications SYNOPSIS
use Business::EDI::Spec; my $spec = Business::EDI::Spec->new('segment'); DESCRIPTION
CSV files originally from edi4r are included as part of Business::EDI. They are used to define the many different messages, segements, data elements, composite data elements, and codelists that are part of a given version of the U.N. specification. The CSV spec files are composed differently for the different structures defined. So we have to parse them differently. ==> Business/EDI/data/edifact/untdid/EDCD.d07a.csv # Composite Elements CompositeCode;label;pos;code;mandatory;def;[pos;code;mandatory;def;...] C001;TRANSPORT MEANS;010;8179;C;an..8;020;1131;C;an..17;030;3055;C;an..3;040;8178;C;an..17; C002;DOCUMENT/MESSAGE NAME;010;1001;C;an..3;020;1131;C;an..17;030;3055;C;an..3;040;1000;C;an..35; C004;EVENT CATEGORY;010;9637;C;an..3;020;1131;C;an..17;030;3055;C;an..3;040;9636;C;an..70; C001 => {label => 'TRANSPORT MEANS;010;8179;C;an..8;020;1131;C;an..17;030;3055;C;an..3;040;8178;C;an..17; ==> Business/EDI/data/edifact/untdid/EDED.d07a.csv # Data Elements code;def;class(?):label 1000;an..35;B;Document name 1001;an..3;C;Document name code 1003;an..6;B;Message type code 1000 => {label => 'an..35;B;Document name ==> Business/EDI/data/edifact/untdid/EDMD.d07a.csv # Messages MessageCode:x:rel:org:z:SegmentGroup;label;SegCode;mandatory;repeats;[SegCode;mandatory;repeats;...] APERAK:D:07A:UN::;Application error and acknowledgement message;UNH;M;1;BGM;M;1;DTM;C;9;FTX;C;9;CNT;C;9;SG1;C;99;SG2;C;9;SG3;C;9;SG4;C;99999;UNT;M;1 APERAK:D:07A:UN::SG1;SG01;DOC;M;1;DTM;C;99 APERAK:D:07A:UN::SG2;SG02;RFF;M;1;DTM;C;9 APERAK:D:07A:UN:: => {label => 'Application error and acknowledgement message', UNH;M;1; BGM;M;1; DTM;C;9;FTX;C;9;CNT;C;9;SG1;C;99;SG2;C;9;SG3;C;9;SG4;C;99999;UNT;M;1 ==> Business/EDI/data/edifact/untdid/EDSD.d07a.csv # Segments SegCode;label;pos;code;class;repeats[pos;code;class;repeats;...] ADR;ADDRESS;010;C817;C;1;020;C090;C;1;030;3164;C;1;040;3251;C;1;050;3207;C;1;060;C819;C;5;070;C517;C;5; AGR;AGREEMENT IDENTIFICATION;010;C543;C;1;020;9419;C;1; AJT;ADJUSTMENT DETAILS;010;4465;M;1;020;1082;C;1; ADR => {label => 'ADDRESS', 010;C817;C;1;020;C090;C;1;030;3164;C;1;040;3251;C;1;050;3207;C;1;060;C819;C;5;070;C517;C;5; ==> Business/EDI/data/edifact/untdid/IDCD.d07a.csv # Composites (interactive) E001 => {label => 'ADDRESS DETAILS;010;3477;M;an..3;020;3286;M;an..70;030;3286;C;an..70;040;3286;C;an..70;050;3286;C;an..70;060;3286;C;an..70;070;3286;C;an..70; ==> Business/EDI/data/edifact/untdid/IDMD.d07a.csv # Messages (interactive) MsgCode:x:rel:org:z:SegmentGroup;label;SegCode;mandatory;class;repeats;;[mandatory;class;repeats;...] IHCEBI:D:07A:UN::;Interactive health insurance eligibility and benefits inquiry and;UIH;M;1;MSD;M;1;SG1;C;9;SG2;C;1;UIT;M;1 IHCEBI:D:07A:UN::SG1;SG01;PRT;M;1;NAA;C;9;CON;C;9;FRM;C;9 IHCEBI:D:07A:UN::SG2;SG02;DTI;M;1;ICI;C;1;FRM;C;9;SG3;C;999 IHCEBI:D:07A:UN::SG3;SG03;BCD;M;1;HDS;C;9;DTI;C;1;PRT;C;9;FRM;C;9 IHCLME:D:07A:UN::;Health care claim or encounter request and response - interactive;UIH;M;1;MSD;C;1;PRT;C;9;NAA;C;9;CON;C;9;BLI;C;1;ITC;C;1;FRM;C;99;SG1;C;3;SG2;C;99;UIT;M;1 IHCLME:D:07A:UN::SG1;SG01;OTI;M;1;NAA;C;2 IHCLME:D:07A:UN::SG2;SG02;PSI;M;1;DNT;C;35 ==> Business/EDI/data/edifact/untdid/IDSD.d07a.csv # Segments (interactive) SegCode;label;pos;code;mandatory;repeats(?) AAI;ACCOMMODATION ALLOCATION INFORMATION;010;E997;M;20; ADS;ADDRESS;010;E817;C;1;020;E001;C;1;030;3164;C;1;040;3251;C;1;050;3207;C;1;060;E819;C;1;070;E517;C;1; AAI => {label => 'ACCOMMODATION ALLOCATION INFORMATION', pos => '010', E997;M;20; TO DO
Parsing for interactive specs. SEE ALSO
edi4r - http://edi4r.rubyforge.org Business::EDI AUTHOR
Joe Atzberger perl v5.12.4 2010-09-08 Business::EDI::Spec(3pm)
All times are GMT -4. The time now is 10:53 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy