Sponsored Content
Top Forums UNIX for Advanced & Expert Users How to get the Missing dates between two dates in the table? Post 302772422 by Yoda on Monday 25th of February 2013 12:07:27 PM
Old 02-25-2013
You can use ALL_OBJECTS to generate missing dates:
Code:
select to_char(to_date('01/02/2013','dd/mm/yyyy') - 1 + rownum, 'dd/mm/yyyy') from ALL_OBJECTS
where  to_date('01/02/2013','dd/mm/yyyy') - 1 + rownum <= to_date('06/02/2013','dd/mm/yyyy');
01/02/2013
02/02/2013
03/02/2013
04/02/2013
05/02/2013
06/02/2013

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

comparing 2 dates

hi , I have two variables both containg dates, x= `date` and y= `date' their format being -> Fri Nov 12 22:59:50 MST 2004 how do I compare which one is greater. ->Can dates be converted into integer and then compared? ( one lengthy way would be to compare the words one by... (7 Replies)
Discussion started by: k_oops9
7 Replies

2. Shell Programming and Scripting

Need script to generate all the dates in DDMMYY format between 2 dates

Hello friends, I am looking for a script or method that can display all the dates between any 2 given dates. Input: Date 1 290109 Date 2 010209 Output: 300109 310109 Please help me. Thanks. :):confused: (2 Replies)
Discussion started by: frozensmilz
2 Replies

3. Programming

Dates in C

Hello, I am working on a program in C and need to read, write and manage Dates (YYY-MM-DD HH:MM). I have made my own version of a structure to store the date data and something else. Do you recommend me to use the time.h library? In such case, is it worthwhile to have an structure containing... (1 Reply)
Discussion started by: Ister
1 Replies

4. Programming

SQL: find if a set od dates falls in another set of dates

Don't know if it is important: Debian Linux / MySQL 5.1 I have a table: media_id int(8) group_id int(8) type_id int(8) expiration date start date cust_id int(8) num_runs int(8) preferred_time int(8) edit_date timestamp ON UPDATE CURRENT_TIMESTAMP id... (0 Replies)
Discussion started by: vertical98
0 Replies

5. Emergency UNIX and Linux Support

Replacing dates]] with (dates)]]

Hi guys, For my wiki site I need to fix 1400 pages that use the wrong date format, most pages (not all) use eg. 1988]] I need to change that to (1988)]] The date range goes back to 1400 so I guess I need to do the following ssh into my server, dump mysql database vi .sql dump search... (20 Replies)
Discussion started by: lawstudent
20 Replies

6. UNIX for Dummies Questions & Answers

How to write the dates between 2 dates into a file

Hi All, I am trying to print the dates that falls between 2 date variables into a file. Here is the example. $BUS_DATE =20120616 $SUB_DATE=20120613 Output to file abc.txt should be : 20120613,20120614,120120615,20120616 Can you pls help me accomplish this in LINUX. Thanks... (5 Replies)
Discussion started by: dsfreddie
5 Replies

7. Shell Programming and Scripting

Generating dates between two dates

HI, i have row like this HHH100037440313438961000201001012012073110220002 N in this i have 2 dates in pos 25-32 and 33-40 , so based upon the se two dates , i need to generated records between these two values so in the above record 20100101 and 20120731 need to genearte rows like this... (4 Replies)
Discussion started by: sathishsr
4 Replies

8. Shell Programming and Scripting

How to get dates between two dates?

HI, to my shell script i pass two parameters date1 and date2 is there any way to get all dates betwen these two dates? if i pass 20130714 and 20130717 i need to get below dates 20130715 20130716 is it possible. thanks (3 Replies)
Discussion started by: ulab
3 Replies

9. Shell Programming and Scripting

Identifying missing file dates

Hi Experts, I have written the below script to check the missing files based on the date in the file name from current date to in a given interval of days. In the file names we have dates along with some name. ex:jera_sit_2017-04-25-150325.txt. The below script is working fine if we have only... (10 Replies)
Discussion started by: nalu
10 Replies

10. Shell Programming and Scripting

Display dates between two dates

Hi All, I have 2 dates in mm/dd format. sdate=10/01 (October 01) edate=10/10 (October 10) I need the dates in between these 2 dates like below. 10/01 10/02 10/03 10/04 10/05 10/06 10/07 10/08 (1 Reply)
Discussion started by: jayadanabalan
1 Replies
Time::ParseDate(3)					User Contributed Perl Documentation					Time::ParseDate(3)

NAME
Time::ParseDate -- date parsing both relative and absolute SYNOPSIS
use Time::ParseDate; $seconds_since_jan1_1970 = parsedate("12/11/94 2pm", NO_RELATIVE => 1) $seconds_since_jan1_1970 = parsedate("12/11/94 2pm", %options) OPTIONS
Date parsing can also use options. The options are as follows: FUZZY -> it's okay not to parse the entire date string NOW -> the "current" time for relative times (defaults to time()) ZONE -> local timezone (defaults to $ENV{TZ}) WHOLE -> the whole input string must be parsed GMT -> input time is assumed to be GMT, not localtime UK -> prefer UK style dates (dd/mm over mm/dd) DATE_REQUIRED -> do not default the date TIME_REQUIRED -> do not default the time NO_RELATIVE -> input time is not relative to NOW TIMEFIRST -> try parsing time before date [not default] PREFER_PAST -> when year or day of week is ambigueous, assume past PREFER_FUTURE -> when year or day of week is ambigueous, assume future SUBSECOND -> parse fraction seconds VALIDATE -> only accept normal values for HHMMSS, YYMMDD. Otherwise days like -1 might give the last day of the previous month. DATE FORMATS RECOGNIZED
Absolute date formats Dow, dd Mon yy Dow, dd Mon yyyy Dow, dd Mon dd Mon yy dd Mon yyyy Month day{st,nd,rd,th}, year Month day{st,nd,rd,th} Mon dd yyyy yyyy/mm/dd yyyy-mm-dd (usually the best date specification syntax) yyyy/mm mm/dd/yy mm/dd/yyyy mm/yy yy/mm (only if year > 12, or > 31 if UK) yy/mm/dd (only if year > 12 and day < 32, or year > 31 if UK) dd/mm/yy (only if UK, or an invalid mm/dd/yy or yy/mm/dd) dd/mm/yyyy (only if UK, or an invalid mm/dd/yyyy) dd/mm (only if UK, or an invalid mm/dd) Relative date formats: count "days" count "weeks" count "months" count "years" Dow "after next" Dow "before last" Dow (requires PREFER_PAST or PREFER_FUTURE) "next" Dow "tomorrow" "today" "yesterday" "last" dow "last week" "now" "now" "+" count units "now" "-" count units "+" count units "-" count units count units "ago" Absolute time formats: hh:mm:ss[.ddd] hh:mm hh:mm[AP]M hh[AP]M hhmmss[[AP]M] "noon" "midnight" Relative time formats: count "minutes" (count can be franctional "1.5" or "1 1/2") count "seconds" count "hours" "+" count units "+" count "-" count units "-" count count units "ago" Timezone formats: [+-]dddd GMT[+-]d+ [+-]dddd (TZN) TZN Special formats: [ d]d/Mon/yyyy:hh:mm:ss [[+-]dddd] yy/mm/dd.hh:mm DESCRIPTION
This module recognizes the above date/time formats. Usually a date and a time are specified. There are numerous options for controlling what is recognized and what is not. The return code is always the time in seconds since January 1st, 1970 or undef if it was unable to parse the time. If a timezone is specified it must be after the time. Year specifications can be tacked onto the end of absolute times. If "parsedate()" is called from array context, then it will return two elements. On sucessful parses, it will return the seconds and what remains of its input string. On unsucessful parses, it will return "undef" and an error string. EXAMPLES
$seconds = parsedate("Mon Jan 2 04:24:27 1995"); $seconds = parsedate("Tue Apr 4 00:22:12 PDT 1995"); $seconds = parsedate("04.04.95 00:22", ZONE => PDT); $seconds = parsedate("Jan 1 1999 11:23:34.578", SUBSECOND => 1); $seconds = parsedate("122212 950404", ZONE => PDT, TIMEFIRST => 1); $seconds = parsedate("+3 secs", NOW => 796978800); $seconds = parsedate("2 months", NOW => 796720932); $seconds = parsedate("last Tuesday"); $seconds = parsedate("Sunday before last"); ($seconds, $remaining) = parsedate("today is the day"); ($seconds, $error) = parsedate("today is", WHOLE=>1); AUTHOR
David Muir Sharnoff <muir@idiom.com>. LICENSE
Copyright (C) 1996-2006 David Muir Sharnoff. License hereby granted for anyone to use, modify or redistribute this module at their own risk. Please feed useful changes back to muir@idiom.com. perl v5.12.1 2006-08-15 Time::ParseDate(3)
All times are GMT -4. The time now is 05:00 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy