Select of date with yyyymmdd format
HI I have a report that I want to select the current date -1.
but our dates are in this format
YYYYMMDD so I cant just use 'current date?
What database are you reporting against?
If you're using Oracle, you should consider creating a SQL Expression field with this code:
TO_CHAR("DATE_FIELD", 'yyyymmdd')
You can then use this field in the Record Selection formula to make sure the query generated contains a where clause. The record selection would be:
totext(currentdate-1, "yyyyMMdd") = {%SQL_Expression_Formula}
If you're using SQL Server, the SQL Expression formula would be:
replace(convert(varchar, "DATE_FIELD", 111), '/','')
-Abhilash
Similar Messages
-
How to append date in YYYYMMDD format in .par file for export
Hi,
Database Version: 10.2.0.4
OS: AIX
I have an export script which reads .par file and executes "exp" to export schema.
I would like to add date in "YYYYMMDD" format for the dump file like this
owner=scott file=/exports/scott_${`date '+%Y%m%d'`}.dmp feedback=10000
I know above statement will not help, but I am giving it as example on what I want to achieve.
I want the file name as =/exports/scott_20120712.dmp
Thanks
Sarayuuser13312943 wrote:
Hi,
Database Version: 10.2.0.4
OS: AIX
I have an export script which reads .par file and executes "exp" to export schema.
I would like to add date in "YYYYMMDD" format for the dump file like this
owner=scott file=/exports/scott_${`date '+%Y%m%d'`}.dmp feedback=10000bcm@bcm-laptop:~$ export YYYYMMDD=`date '+%Y%m%d'`
bcm@bcm-laptop:~$ echo $YYYYMMDD
20120712
bcm@bcm-laptop:~$
owner=scott file=/exports/scott_${YYYYMMDD}.dmp feedback=10000 -
How to parse string to date with defualt format?
is there any possibilities to parse a string to date if we don't specify the format in SDF?
In database we have different formats and we need to convert each one convert to date with common format(something like default), is there any possibilities to do in java?jwenting wrote:
Tolls wrote:
ColinAtWork wrote:
SumantK wrote:
In database we have different formats and we need to convert each one convert to date with common format(something like default), is there any possibilities to do in java?Why don't you store the date in the database as a DATE datatype then you can format anyway you like??Because some people seem to fear DATEs and prefer the supposed comforts of a VARCHAR2...after all, who knows what murky goings on occur with a DATE, but at least a VARCHAR2 is readable, or something like that anyway.Just because some people don't know how to work with DATE fields (which is the real reason for their "fear" doesn't mean you shouldn't use them.
They're the appopriate solution, so use it.Often but not always true.
For example neither MS SQL Server nor Oracle timestamp types will store the resolution capable with the Java Date type. So if one wants to maintain all of that resolution one requires either a varchar or two columns.
And although I haven't been able to confirm it (recently at least) at one time one of the Oracle drivers had a bug that a timestamp would wipe out following columns. For that one either one was left with having only a single timestamp as the last column or using a varchar. -
Select duplicate Data with same No.
Dear All experts,
How we giong to select the data with same No as 1 record count.
example : Bellow is the sample table contains 5 rows records, but of records ard same number.
post No. Name
1001 Jacky
1001 Jimmy
1002 Mark
1003 Jin
1004 chloe
when i use the select statement bellow :
Select * from table into corresposding of table t_table up to 3.
will get the result like below .
1001 Jacky
1001 Jimmy
1002 Mark
Question is , how i going to write the statement to get the 3(depend on user insert how many record) different no. example , 2records of 1001, 1002 , and 1003 .if its a ztable then better to keep a counter field for your requirement.
else.
parameter : count type i. "this holds number of required data.
select * from TT_XYZ into table gt_itab.
loop at gt_itab into gs_itab.
at end of post_no.
count = count - 1.
endat.
if count = 0.
exit.
endif.
append gs_itab to gt_itab2.
clear gs_itab.
endloop.
now gt_itab2 holds required entries for you. -
Apex mobile Date-Picker (date with time) format mask error
Hi together.
I'm playing a little bit with Apex mobile.
I want to save a date with hours and minutes in the database. So i have an date field (type: date with time).
On my phone i can select an date value with time, but when i want to save the value, i get an format error, that the format 'YYYY-MM-DD"T"HH24:MI:SS' is wrong.
I can't change the format mask in the element properties, because it is everytime going back to the old value "YYYY-MM-DD"T"HH24:MI:SS", when i save it.Not a 100% related, but personally and from a usability point-of-view I really dislike the built-in datetimepicker and so far every client who has seen it has agreed with it. It pops the date and time down to the bottom, it only selects when you hit close, it just doesn't look appealing as the normal datepicker does and you expect more. Personally I've also gone the route Jari described several times, and it's probably still the cleanest and least error-prone option. Validating dates can be quite a pain, but the datepicker built-in validation does that fine, so if you can circumvent validating a free-text time field that helps). I've used some jQuery timepicker plugins aswell, and they're ok, but still don't solve the validation (even though there is some javascript validation you still need serverside validation). All I'm trying to say is that using select lists for hour-minutes is not such a bad idea in my opinion.
-
Alpha channel data with layered format plugin
I have a layered format plugin and I am trying to write the alpha channel information separately. I have set up channelPortProcs and I am attempting to read the pixel data with readPixelsProc. The issue is that even though the readPixelsProc function doesn't return any errors the rectangle that is supposed to store the rectangle that was actually read is a 0x0 rectangle. I can't seem to find why this would be or what I might be doing wrong. Here's what I have so far:
// set up the pixel buffer
int32 bufferSize = imSize.h*imSize.v;
Ptr pixelData = sPSBuffer->New( &bufferSize, bufferSize );
if (pixelData == NULL)
*gResult = memFullErr;
return;
// Define the source and destination rectangles
ReadChannelDesc *alphaChannel = gFormatRecord->documentInfo->alphaChannels;
PIChannelPort port = alphaChannel->port;
PSScaling scale;
scale.sourceRect = scale.destinationRect = alphaChannel->bounds;
VRect destRect = scale.sourceRect;
// Set up the descriptor for reading pixel data
VRect wroteRect = {0};
PixelMemoryDesc dest = {0};
dest.rowBits = imSize.h*alphaChannel->depth;
dest.colBits = alphaChannel->depth;
dest.depth = alphaChannel->depth;
dest.data = pixelData;
// Put the pixel data into the buffer
*gResult = gFormatRecord->channelPortProcs->readPixelsProc(port,&scale, &destRect, &dest, &wroteRect);
if(*gResult != noErr)
return;
The alpha channel gives me the proper name, but I just can't get the data associated with it. Thanks.I am still trying to find a solution to this. The propChannelName is read only and the documentInfo structure is NULL when reading. Any suggestions?
-
Outputted date with unusual format mask
I am getting a flat file outputed from Fusion Financials SAAS, and one of the columns has this: 2013-11-14T15:10:36.000-06:00
Clearly its a date. I am guessing its a datetime TIMESTAMP WITH TIME ZONE datatype. But, the Format Model is unfamiliar to me, particularly regarding the letter 'T'.
Because its a flat file, this is coming to me as varchar2 data. I'd like to convert it to datetime.
I got to this:
select to_timestamp_tz('2013-11-14T15:10:36.000-06:00', 'YYYY-MM-DD HH24:MI:SS.FF TZH:TZM') AT LOCAL
from dual
It fails because of the letter 'T',
I know I could do this:
select to_timestamp_tz(REPLACE('2013-11-14T15:10:36.000-06:00','T',' '), 'YYYY-MM-DD HH24:MI:SS.FF TZH:TZM') AT LOCAL
from dual
And it works.
But that is not the point. The point is to find the Format Model that Oracle is using here.
Any thoughts on this?
Thanks,
ArieArie, the timezone format in the file is based on ISO 8601: ISO 8601 - Wikipedia, the free encyclopedia
This should work:
SQL> select to_timestamp_tz('2013-11-14T15:10:36.000-06:00', 'YYYY-MM-DD"T"HH24:MI:SS.FF TZH:TZM') from dual;
TO_TIMESTAMP_TZ('2013-11-14T15:10:36.000-06:00','YYYY-MM-DD"T"HH24:MI:SS.FF
14-NOV-13 03.10.36.000000000 PM +06:00
Hope this helps,
Oliver
Fusion Apps Developer Relations
https://blogs.oracle.com/fadevrel -
Select multiple date with interval in date-navigator
Hi,
Is it possible to have a multiple date selection with interval in a date-navigator. When yes, how?
Richard MiddelburgLook at the below thread:
Re: Date Navigator Challenge
Raja T -
Loading Excel data with custom format applied
Hi,
I have an Excel File as source with the custom formatting applied to the data in it.
For Eg. value 64 has special formatting applied so as to display it as 0064.
BODS loads only the actual data as 64 and though I expect to load the formatted data(0064).
Is this an expected behavior of BODS?
DS Version : 14.1.2
Thanks.No. If you define file format as flat file and define the field type as char then you can load all the formatted data like 0064 into DB. If you use excel then excel will remove leading zeros. This is excel functionality. or you can define the input file as CSV file and change the format of the field.
Thanks, -
Error While Formatting the Date with Timestamp Format in MS WORD Template
Hey
I have a requirement where i need to change the date from " 2009-08-11T20:51:47.000-05:00 " to 08-AUG-2009:8:51:47 PM
For this i SQL wrote
CAST(DAYOFMONTH("- Protocol Product"."Date Created") AS VARCHAR(2)) || '-' || CAST(MONTHNAME("- Protocol Product"."Date Created") AS CHAR(3)) || '-' || CAST(YEAR("- Protocol Product"."Date Created") AS CHAR(4))DATE,
"- Protocol Product"."Date Created" to get the first part i.e "08-AUG-2009" and for the second part i was just changing the date in MS Word h:mm am/pm and its not showing the correct time its showing 11-Aug-2009 1:51 AM insteas of 8:51 PM
Is there any way to get the Format i need by using the SQL
Any Help Appreciated
~SrixI used the following XSL and its Working !
<?xdoxslt:xdo_format_date($_XDOXSLTCTX, "YOUR COLUMN",'DD-MMM-YYYY HH12:MI:SS AM')?> -
Creating date with yyyyMMDDHHmmss format??
How can i produce date so the result is in the format of "yyyyMMDDHHmmss"??
For example 20060729180902. What is the sourcecode?What do u mean by SimpleDateFormat??
Can u explain more?Im new in java....Open the API. Search for class SimpleDateFormat. Read the description and the methods.
No point in me repeating what it says. -
Select Vender data with first 2 digit
Hi,
I have a requirement. In selection screen i need a parameter with 2 digit.
As per this parameter, i need to select all the venders start with this 2 digit from LFA1.
What should be the select where condition.
Thanks and Regards
Joby Jacob
Moderator message: very basic, please search for available information and try yourself before asking.
locked by: Thomas Zloch on Sep 3, 2010 11:33 AMDepends on the quality of Netflix streaming that you used.
https://support.netflix.com/en/node/87
Manage Bandwidth Usage
Low (uses up to 0.3 GB per hour)
Medium (uses up to 0.7 GB per hour)
High (uses up to 1 GB per hour, up to 2.8 GB per hour if watching HD, or up to 4.7 GB per hour if watching 3D)
Auto (adjusts itself automatically to deliver the highest possible quality, based on your current internet connection speed) -
Time Data loading with missing format
Hi expert,
after we load time data, find the following missing information:
0CALDAY:
20.080.112 (Error)
2008.01.12 (correct one)
0CALMONTH:
200.801(Error)
2008.01(correct one)
0CALQUARTE
20.081(Error)
20081(correct one)
Could anyone let us know how to correct data with missing format to correct one and how to do this step by step? Many thank!What is the source for this data ?
Have it corrected in the source
Or
Correct in PSA and load it from there.
Does it happen only for a few records ? -
Can someone assist with how to select dates for a table based on the criteria that the offset is 5 and if at that offset the number is less than 2 e.g. 20.07.1998 would be selected and 20.07.2007 will not.
thanx in advanceHi Darlington,
First you select all the dates into your internal table.
What i mean to say is, use selection criteria to pick data from your data base table.
after fetching all the records check whether the date field's first character
if it is '2' then delete that record from the internal table.
<b>Example1:</b>
tables: pa0000.
data: begin of itab occurs 0,
begda like pa0000-begda,
end of itab.
select begda from pa0000 into table itab.
if sy-subrc = 0.
sort itab by begda.
<b>delete itab where begda+0(1) eq '2'.</b>
endif.
<b>Also check another example:</b>
System stores data as 'YYYYMMDD' format.
data: v_date1 type sy-datum value '19980720'.
data: v_date2 type sy-datum value '20070720'.
if v_date1+0(1) ge '2'.
write:/ 'Not a valid date'.
else.
write:/ 'Valid date'.
endif.
if v_date2+0(1) ge '2'.
write:/ 'Not a valid date'.
else.
write:/ 'Valid date'.
endif. -
Extract text with specific format ?
Hello,
Is there a way to extract text with a specific format in a document (i.e. font type/ size or even font colour)?
thanks in advance!Hello gillad,
I am afraid only indicators are the bold font or text colour...
Having said that, just as I was writting my response, the following idea came to me:
Convert the pdf into word
Click on text of interest (text with distinct format)
Use the feature "select all text with similar formating (no data)" under "editing" within the "home" ribbon
Having said that, hopefully a tool set/ action can be developed one day...
Maybe you are looking for
-
Web service proxy take ~4 minutes to detect connection problem in AIX!
Dear All, i am developing a client application that consume web service , by jdeveloper 10.1.3.1. i found a problem, in AIX, that the web service proxy generated by jdeveloper take long time to detect connection problem to the server (e.g. server is
-
Some pages not displaying columns properly since FF 37.0.1 update
The problem showed up on some pages on Lynda.com. IE 11 does not have the problem. Here is a screen shot of a problem page on Lynda.com in FF, showing the column displaying wrongly: https://support.cdn.mozilla.net/media/uploads/images/2015-04-08-23-3
-
Old computer account into new computer,
I have used migration assistant to move my daughter's account from a shared family mac to a new ibook. I was the administrator on the family mac but she had admin rights as well. On the new ibook she is the only account. Now I find that most of the s
-
Integration of PL/SQL and JSP (Java Server Pages)
I need to match a web application developed with PL/SQL with another developed in JSP (Java Server Pages) the problem is that the two apps interact with the same databese, an share de same users, I need to know how to get the user and password loged
-
Variable "read mode setting" Only Values for InfoProvider
Hi, I have a problem with Selection Variable for a BEx Query: - I'm working with SAP BI 7.0 support package 15 - My query is an input ready query; - Characteristic, I want to filter with variable, has query property Advanced->Query Execution for Filt