to get the yr as YYYY format
HelloI have the mtl_material_transactions of table
the transaction_date column has the following values
01/01/2007
2007-01-01 13:01:50
11/02/2011 15:39:38
I want to get another column LUN and year
My YR
JAN 2007
FEB 2011 ETC.
I tried
SELECT
TO_CHAR(TRANSACTION_DATE )col1,SUBSTR(TO_CHAR(TRANSACTION_DATE ),4,3)MON,
transaction_date FROM MTL_MATERIAL_TRANSACTIONS
i get the output as
col1 MON transaction_date
1-JAN-07 JAN 1/1/2007
1-JAN-07 JAN 1/1/2007 1:01:50 PM
11-FEB-11 FEB 2/11/2011 3:39:38 PM
I want another column with year 2007 instead of 07 etc.kindly guide me
Thanks in advance
use to_char for this as
select to_char(to_date('1/1/2007','dd/mm/yyyy'),'Mon') from dual
select to_char(to_date('1/1/2007','dd/mm/yyyy'),'YYYY') from dual
Tags: Database
Similar Questions
-
Conversion of the year in YYYY format to return to the selection list
With Apex 4.1.1 on Linux (Apex Listener on glassfish)
I have a table with the dates of weekend and use this table for like my LOV.
The selection list appears as 12-SEPT-12 when I check the value attribute of Firebug. Problem is that it comes as year 0012 instead of 2012 when I try to use it in my PL SQL code to save it in a table.
Is there a way I can get the return value for the year in YYYY format for the return value to the selection list? Have you tried to_date (dt, ' MON-DD-YYYY "") with no luck.
See you soon.All APEX session state values take place as VARCHAR2s. Explicit conversion between DATE using the specified formats values is recommended. Converted to a VARCHAR2 in the LOV query:
select to_char(week_ending, 'DD-MON-YYYY') l, to_char(week_ending, 'YYYY-MM-DD') v from ...
and to this DAY in the PL/SQL code of process:
...to_date(:p1_week_ending, 'YYYY-MM-DD')...
I'm trying to standardize on the use of ISO 8601 representation of date not displayed values. These are unambiguous, sort correctly by using the semantics of character and are compatible with other systems and technologies.
-
Firefox help
Search
"Found 0 results for" my firefox top bar has been changed, I used to be able to get the bookmarks printed Format file, and other services that I have found useful when taking information from the internet, I found bookmarks to the right of the new game to the top, but it seems not instantly friendly where they went, I want that they come back? »
See:
-
How can I get the hour (24-hour format) stored time value
I have a field called start_time in a database mysql and all I have to do, but unable to do so far is part time 24-hour (without leading zeros) in this field. I tried all the date functions, including date('G'), getdate and start_time table [hours].
I get either today's date & time, or just first digit of he in time.
What follows is the closest, he came to work, but it's the ethat on is back just the first digit of the hour if there are two numbers in 24-hour format (ex: 14:00 = 14, it returns oly 1)
<? PHP
;
;
;
$start_time = $row ['start_time'];
$hour = $start_time [h];;
;
;
? >
Help, please! I spent too much time on such work of subordinate. According to me, part of my problem is that I am under PHP 4.
Thanks in advance,
Marcus
marcusinfla wrote:
Do you mean similar to the following? I don't seem to get a value
No, it should be part of the SQL statement:
$lookup = "SELECT *, HOUR(start_time) AS start_hour FROM $tbl";
-
No further details, how can I fix this so I can print! It happens every time I try to print a Web page, I usually have to copy the link and print from the browser.
You must select the 'proper' printer you want to use the catalogue-> name dialog box. This XPS 'printer' is the default in Firefox on Windows, until you select another "printer". I use the quotes, because a "printer" can be a physical printer (material, which prints on paper) or a virtual printer (software, which is in a file - format pdf, xps, etc.).
-
did not get the acer extensa cd format my laptop
Hi, my microsoft office problems. and I want to format but I didn't know where I put the cd. so, how would I format my laptop without the cd? my laptop is estensa 4630Z. really need help. TQ
Hello
Windows XP production has stopped long back however, try with your local computer stores to see if they have one, and also, you can contact the Microsoft store.
Microsoft Store: http://www.microsoftstore.com/store/msstore/en_US/home
Note: Before formatting the laptop, I would recommend you to back your files using windows backup.
Backup and restore: http://support.microsoft.com/kb/309340
Note: If you are facing any problem with Microsoft Office then I suggest you to ask your question in the forums of Microsoft office.
Microsoft Office Forum: http://answers.microsoft.com/en-us/office/forum/word
-
How to get the format YYYYMM, regardless of the month
Hello, I want to be able to get the year months '201401' format and 201402 regardless of what month is only for the current year.
Select to_char (Trunc (add_months (sysdate-2), 'MM'), "YYYYMM") of the double
output:
201409
But if I move to the next month and use the same command, the output displays 201410.
So basically how I would change the query to select the format of yearmonth from Jan Feb 2014
Hello
You can do this by truncating the sysdate for the current year:
TO_CHAR (trunc (sysdate, 'YEAR'), "YYYYMM"); - 201401
TO_CHAR (add_month (trunc (sysdate, 'YEAR'), 1), "YYYYMM"); - 201402
This help you?
Cheerz,
Stako
-
How can I get the year of a datetime field
I have a fieild datetime, I need to display only the year in yyyy format
I tried
TO_DATE (start_time, yyyy), but it does not work...
Help, please...SQL> -- generating sample data: SQL> with t as ( 2 select systimestamp dtcol from dual 3 ) 4 -- 5 -- actual query: 6 -- 7 select dtcol 8 , extract (year from dtcol) 9 , to_char(dtcol, 'MON') 10 from t; DTCOL EXTRACT(YEARFROMDTCOL) TO_CHAR(DTCO --------------------------------------------------------------------------- ---------------------- ------------ 30-06-10 01:42:28,328000 +02:00 2010 JUN 1 row selected.
http://download.Oracle.com/docs/CD/E11882_01/server.112/e10592/functions057.htm#SQLRF00639
And if you want to visit the site more underestimated never, then please by all means favorite:
http://Tahiti.Oracle.com;)
-
get the name of the day of a date (format yyyy/mm/dd)
Hello
In blackberry java application development is possible to get the name of the day of a date (format yyyy/mm/dd).
I have a date as 09/15/2013. I want the output like Sunday
Thank you and best regards.
Thank you reply Erwan fo...
I post my code using... It can be used to get the name of the day for a date string.
//SimpleDateFormat write = new SimpleDateFormat("EEEE-MMM-dd");//It will return Weekday name as full plus monthe name plus date SimpleDateFormat write = new SimpleDateFormat("EEEE");//It will return Weekday name Date date = new Date(HttpDateParser.parse("2013/09/12")); System.out.println(write.format(parsedDate));
Best regards.
-
Is it possible to get the format dd-mmm-yy to have four digits for the year?
I have my date in the calendar control / in my tray in the format dd-mmm-yy (today is November 11, 12). Is there a way to get the AA to become yyyy (i.e. read 2012)?
Hello
Yes, go to the control panel
Select the language and the region.
Select additional settings on the Formats tab
Click on the Date tab
In Date formats, select Dd-mmm-AA in the dropdown tab menu
Then add manually additional AA to make dd mmm yyyy
Select apply.
-
How to get the current date to display in the Spanish format.
The coding is in format Adobe Acrobat, DC. The coding I have for the English today's date is:
var d = new Date();
sDate = util.printd var ("dd mmmm yyyy", d);
this.getField("Text1").value = sDate;
How can I get the current date displayed in this Spanish format: 07 December 2015
Thank you
It's a little complicated... But this code should do the trick:
util.printd("dd", d) + " de " + util.printd("date(es){MMMM}", d, true) + " de " + util.printd("yyyy", d);
Edit: Fixed the code... Did not notice the 'of' second before.
-
Get the Date format that the user sets in "Preferences".
Hello
Is it possible that I can get the date format (for example: "DD-MMM-YYYY', 'DD-MM-YYYY' etc.) where the user desires under 'Préférences' in a page of the OPS?
Concerning
Hawker
Published by: HawkerHunter on Aug 6, 2011 11:02ICX_DATE_FORMAT_MASK - is the value of profile that contains the value that is selected in the preferences page.
You can try pageContext.getProfile ("ICX_DATE_FORMAT_MASK");
in your code.Kind regards
Krishnan guru. -
Possible to get the European date format by default without UK correction?
I have some terrible evil with the terrible in Excel and other programs American date format when I have my computer, the value of the American region.
I thought I fixed that by changing just my computer region UK but now I have GBP currency by default and autocorrects obnoxious affecting my Z s and add unnecessary U in every way.
I live in a non-English speaking part of Europe, but my native language is English and I work mainly with the dollar sign ($). Is there anyway to get the normal spelling, the right currency by default ($), 24 hours, but without the fool US default date format?
Thank you.
Explore SystemPreferences settings: language and region and the Advanced button.
-
Where can I get the Toshiba Tecra A9 for tools after formatting the HARD drive?
Hello.
I bought a laptop Tecra A9 with Vista Business. I would format because there are a lot of tools and programs on it the notebook already that I didn't need, and it's very slow.There is a "hidden partition", but if I use it to recover it installs all tools and software.
Fortunately, there was a DVD of Vista Business in the area.
So I would use that one.Now my question: some of the tools (Toshiba HDD protection, Fingerprint-Software) seem useful and I would like to reinstall as soon as he runs again. Where can I download them? I only found the drivers on the Toshiba site.
Thank you very much!
Hello
> Fortunately, there was a DVD of Vista Business in the area. So I would use that one.
It's very strange because I know Toshiba laptops are supplied only with the Toshiba Recovery CD and not an original CD of Microsoft Vista.
If you want to use this recovery CD, you will get the same OS preinstalled with all the drivers and tools such as at the beginning.In my opinion, you should remove all simply not necessary tools and operating system utilities and don t install the OS again!
For registry cleaning, I recommend using the freeware program called CCleaner!Good bye
-
Where does FireFox get the default value for a preference of. What is the format of the file that contains the default value? I need the actual default value for an individual preference.
Topic: config shows some default values, but I need the source from which everything: config returns to the default value.
Any help in this direction is greatly appreciated.User Agent
Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Win64; x 64; Trident/4.0; .NET CLR 2.0.50727; SLCC2; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0)
The preferences that are not hidden if they have by default are stored in two JavaScript text files in the Firefox program folder
You can open them in a tab in Firefox through these links:
resource:///defaults/pref/firefox.js
resource:///greprefs/all.js
Maybe you are looking for
-
Firefox 22.0 - right-click Menu white
Hi guys, for the first time since I use Firefox (and who has been a certain number of years), I have an empty menu with a right click anywhere in Firefox. At this point, I use v22.0. Even the menu file is empty. If you move the mouse a bit on the emp
-
Satellite X 205 - No post start up
One day my laptop froze and after restart HD led and fans starts for a few seconds then they stop. Tried with just the battery and same PSU, so I replaced same CPU. Then I give it to the same computer store to check what is happening, they said MOBO
-
Should I back up my iTunes purchases?
I would like to remove some movies, TV shows, etc. from my MacPro to conserve space; can I re - download at any time or do I store them?
-
I can't move original items out of the "shared" folder
I made a new account on my macbook pro OS X 10.9.5 so the first thing I did was moved all my files in the shared folder. then after I had them in there I've moved them back, thinking that he would make a copy in the shared folder. In fact, he did the
-
I ran windows 7 installation on my computer using DVD who had 32 and 64-bit data and for that I currently have 32-bit and 64-bit installed in my computer. So I would like to know if there is any way I can remove the 32 bit and keep the 64 bits withou