Date format at the query
hi
Can You Please suggest how minimal we can correct this at the query output
My coming output for the date field at the query is
01/28/2008
04/27/2006
06/1/2006
05/16/2006
Desired Output for the query field at the query is
1/28/2008
4/27/2006
6/1/2006
5/16/2006
Zeroes should not be present can you quickly help me in this regard
Hi
Check conversion routine on info object maintainance .
Regards,
Chandu.
Similar Messages
-
How i can change date format in the query
I have made a query and Document date format is DD/MM/YYYY but i want Document date Format as YYYYMMDD. Please help me out as soon as posible.
Thanks is advance.Hi Harman,
By default query shows same date setting what is maitianed in SU01 (user maintenance). User can set the dates as they want. Ask user to log in BI system and go to system> User Profile> Own Data. They can select the date format and save the changes.
If you want to display same setting for all user, please select the format whenever you create any users and change for existing users.
Regards,
Kams -
Setting date format for the entire SQL Server installation - SQL Server 2008 R2-2012
Hi,
I need to safeguard the behaviour of SQL codes that inserting into SQL tables with some date columns. For this purpose, I need to change the date format for the SQL instance and not using CONVERT and CAST.
I've seen the SET DATE FORMAT statement, but if I use it, could I solve my problem?
ThanksThe language setting is related to the database user.
BOL: "DEFAULT_LANGUAGE = { NONE | <lcid> | <language name> | <language alias> }
Specifies the default language for the new user. If a default language is specified for the user and the default language of the database is later changed, the users default language remains as specified.
If no default language is specified, the default language for the user will be the default language of the database. If the default language for the user is not specified and the default language of the database is later changed, the default
language of the user will change to the new default language for the database."
LINK: http://technet.microsoft.com/en-us/library/ms173463.aspx
The default language setting can be overridden by SET LANGUAGE for the session:
http://technet.microsoft.com/en-us/library/ms174398.aspx
Example:
SET LANGUAGE us_english; -- mdy
SELECT CAST ('12/13/2014' as DATE); -- 2014-12-13
GO
SET LANGUAGE british; -- dmy
SELECT CAST ('12/13/2014' as DATE);
GO
(1 row(s) affected)
Changed language setting to British.
Msg 241, Level 16, State 1, Line 2
Conversion failed when converting date and/or time from character string.
Kalman Toth Database & OLAP Architect
SELECT Video Tutorials 4 Hours
New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012 -
How to get the Date format inside the table
I have a startdate column in the db in the format May 5, 2001 12:39:00 PM, when I query it from a view in this way : SELECT startdate, ... FROM ..., it returns the format in the db,
However I have to do this SELECT
decode(startdate, null, 'NOT START'), startdate), ... the result is 5-MAY-01,
then I tried this to_char(startTime, 'Month DD, YYYY HH:MI: A.M.') the results become May 05, 2001 12:39:00 PM. (more space between month and day, and 05 instaed of 5)
Does anybody know how to fix this, so I get exactly what is in the db?
Thanks in advanceNo matter what you do if you are storing a date in a column it will get stored in the Oracle's internal 7 byte date format.
The way you get it on retreiving it is as set by your date format. You can either change the default date format for the instance, the individual session or the individual SQL statement(in this case using to_char(date, 'format')).
If you want to store the date in a format you want to store you'll have to store it as char or varchar2.
<BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by George ([email protected]):
I have a startdate column in the db in the format May 5, 2001 12:39:00 PM, when I query it from a view in this way : SELECT startdate, ... FROM ..., it returns the format in the db,
However I have to do this SELECT
decode(startdate, null, 'NOT START'), startdate), ... the result is 5-MAY-01,
then I tried this to_char(startTime, 'Month DD, YYYY HH:MI: A.M.') the results become May 05, 2001 12:39:00 PM. (more space between month and day, and 05 instaed of 5)
Does anybody know how to fix this, so I get exactly what is in the db?
Thanks in advance<HR></BLOCKQUOTE>
When you do to_char() with 'month' oracle blank pads the month to nine characters, the same goes with day too. So to get rid of it you'll have to trim() the month. And if you want to get a single digit for date less than 10 instead of 0x you'll have to do a bit of extra jugglery using translate() or replace().
Hope this helps
Naveen -
Problem with SQL*Loader and different date formats in the same file
DB: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
System: AIX 5.3.0.0
Hello,
I'm using SQL*Loader to import semi-colon separated values into a table. The files are delivered to us by a data provider who concatenates data from different sources and this results in us having different date formats within the same file. For example:
...;2010-12-31;22/11/1932;...
I load this data using the following lines in the control file:
EXECUTIONDATE1 TIMESTAMP NULLIF EXECUTIONDATE1=BLANKS "TO_DATE(:EXECUTIONDATE1, 'YYYY-MM-DD')",
DELDOB TIMESTAMP NULLIF DELDOB=BLANKS "TO_DATE(:DELDOB, 'DD/MM/YYYY')",
The relevant NLS parameters:
NLS_LANGUAGE=FRENCH
NLS_DATE_FORMAT=DD/MM/RR
NLS_DATE_LANGUAGE=FRENCH
If I load this file as is the values loaded into the table are 31 dec 2010 and 22 nov *2032*, aven though the years are on 4 digits. If I change the NLS_DATE_FORMAT to DD/MM/YYYY then the second date value will be loaded correctly, but the first value will be loaded as 31 dec *2020* !!
How can I get both date values to load correctly?
Thanks!
SylvainThis is very strange, after running a few tests I realized that if the year is 19XX then it will get loaded as 2019, and if it is 20XX then it will be 2020. I'm guessing it may have something to do with certain env variables that aren't set up properly because I'm fairly sure my SQL*Loader control file is correct... I'll run more tests :-(
-
How do I set a custom time & date format in the top bar?
Hello guys,
Very embarassing question, because I've had Apple's for all of my life (starting with the original Apple Macintosh) but I still haven't figured out one thing
How do I set a custom time & date format in the top bar?
When I go to System Preferences > Language & Text > Formats I can set different formats. I have no idea where you will see these, but I know that it's not the top bar where the time and date is being displayed. Because no matter what I enter, the format in the top bar will stay the same. I can only choose things like 24-Hour clock or not, blinking dots and so on in the Time & Date settings from the System Preferences.
Can anyone here point me in the right direction? I see you can even choose to display the week of the year - I'd love to do that!
All help appreciated!
GreetingsLanguage & Text system preferences, Formats tab, customize dates.
There are also many third party menu item utilities that can. Search Macupdate.com for some.
One search yielded iClock Pro. Although I never used it I would think it allows customization. The link I gave you is to the Macupdate download page for that app. On that same page is a Similar Software section which has other apps that can do the same thing.
One listed is iStat Menus. The primary use for iStat Menus is not for displaying date/time but it does do that. And I know it can do what you want because I use iStat Menus to track temperature sensors n my machine and, like you, I want to customize the menu time/date. So I use it instead of the apple clock. It does have the customization features I think you are looking for. -
How to handle Multiple date formats for the same date field in SQL*Loader
Dear All,
I got a requirement where I need to get data from a text file and insert the same into oracle table.
I am using SQL*Loader to populate the data from the text file into my table.
The file has one field where I am expecting date date data in multiple formats, like dd/mon/yyyy, yyyy/dd/mon, yyyy/mon/dd, ,mm/dd/yyyy, mon/dd/yyyy.
While using SQL*Loader, I can see Loading is failing for records where we have formats like yyyy/dd/mon, yyyy/mon/dd, mon/dd/yyyy.
Is there any way in SQL*Loader where we can mention all these date formats so that this date data should go smoothly into the underlying date column in the table.
Appreciate your response on this.
Thanks,
Madhu K.The point being made was, are you sure that you can uniquely identify a date format from the value you receieve? Are you sure that the data stored is only of a particular limited set of formats?
e.g. if you had a value of '07/08/03' how do you know what format that is?
It could be...
7th August 2003 (thus assuming it's DD/MM/RR format)
or
8th July 2003 (thus assuming it's MM/DD/RR format)
or
3rd August 2007 (thus assuming it's RR/MM/DD format)
or
8th March 2007 (thus assuming it's RR/DD/MM format)
or even more obscurely...
3rd July 2008 (MM/RR/DD)
or
7th March 2008 (DD/RR/MM)
Do you have any information to tell you what formats are valid that would allow you to be specific and know what date format is meant?
This is a classic example of why dates should be stored on the database using DATE datatype and not VARCHAR2. It can lead to corruption of data, especially if the date can be entered in any format a user wishes. -
Error with the data format in the TXT file, sending as an Email attachment
Hi all,
I have an problem in the data formating in the TXT file while sending as an attachment via an email by using the FM "SO_DOCUMENT_SEND_API1".
For eg:
The data in the TXT file is looking like as follows:
0 0 0 0 2 L O U D S P E A K R O T H E R 3 8 W h i t e 0 0
0031 L O U D S P E A K R O T H E R 3 8 Black 0 000
38 L O U D S P E A K R O T H E R 3 8 Brown 0 00040
L O U D S P E A K R O T H E R 3 8 Brown 0 00042
and so on
But it should come as :
0 0 0 0 2 L O U D S P E A K R O T H E R 3 8 W h i t e
0 0 0031 L O U D S P E A K R O T H E R 3 8 Black
0 00038 L O U D S P E A K R O T H E R 3 8 Brown
0 00040 L O U D S P E A K R O T H E R 3 8 Brown
All the internal tables are correctly filled.
The code is as follows:
gwa_objtxt = 'Please find attached DATA EXTRACT Sheet'.
append gwa_objtxt to git_objtxt.
describe table git_objtxt lines gv_cnt.
clear git_doc_data.
read table git_objtxt index gv_cnt.
git_doc_data-doc_size = ( gv_cnt - 1 ) * 255 + strlen( gwa_objtxt ).
git_doc_data-obj_langu = sy-langu.
git_doc_data-obj_descr = lv_mtitle.
append git_doc_data.
clear git_packing_list.
refresh git_packing_list.
git_packing_list-transf_bin = space.
git_packing_list-head_start = 1.
git_packing_list-head_num = 0.
git_packing_list-body_start = 1.
git_packing_list-body_num = gv_cnt.
git_packing_list-doc_type = 'RAW'.
append git_packing_list.
Clear : gv_cnt.
Describe table git_objbin lines gv_cnt.
git_packing_list-transf_bin = 'X'.
git_packing_list-head_start = 1.
git_packing_list-head_num = 1.
git_packing_list-body_start = 1.
git_packing_list-body_num = gv_cnt.
git_packing_list-doc_type = 'TXT'.
git_packing_list-obj_descr = 'ATTACH.TXT'.
git_packing_list-obj_name = 'book'.
git_packing_list-doc_size = gv_cnt * 255.
APPEND git_packing_list.
clear git_receivers.
refresh git_receivers.
git_receivers-receiver = gv_eid.
git_receivers-rec_type = 'U'.
append git_receivers.
CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
EXPORTING
DOCUMENT_DATA = git_doc_data
PUT_IN_OUTBOX = 'X'
COMMIT_WORK = 'X'
TABLES
PACKING_LIST = git_packing_list
CONTENTS_BIN = git_objbin
CONTENTS_TXT = git_objtxt
RECEIVERS = git_receivers
EXCEPTIONS
TOO_MANY_RECEIVERS = 1
DOCUMENT_NOT_SENT = 2
DOCUMENT_TYPE_NOT_EXIST = 3
OPERATION_NO_AUTHORIZATION = 4
PARAMETER_ERROR = 5
X_ERROR = 6
ENQUEUE_ERROR = 7
OTHERS = 8.please give the code of
contents bin = git_objbin " how this is getting populated.
0 0 0 0 2 L O U D S P E A K R O T H E R 3 8 W h i t e <b>0 0</b>
0031 L O U D S P E A K R O T H E R 3 8 Black
0 000
38
from this im not able to understand is this over population or concatenation problem
y dont u make a append to the final table
like
data : begin of itxt occurs 0, ,
s1(132) type c ,
end of itxt.
loop at itab.
itxt-s1+0(4) = itab-f1.
itxt-s1+4(6) = itab-f2.
itxt-s1+10(8) = itab-f3.
itxts1+18(4) = itab-f4.
append itxt.
clear itxt.
endloop.
exchange this to the contents bin of hte Fm .
regards,
vijay.
can u please mail the text file and the expected o/p to my mail id [email protected] so that i can see the same from the data provided i m not able to check the result properly . -
Date format in the Web layout of Oracle 10g Reports
Dear all,
I want to change the date format in the oracle reports. I am using weblayout & paper layout. I have changed format mask using property inspector. It appears in paper layout. How can i get in the weblayout, please help me.
With Regards,
SrinivasHi Srinivas,
I think whatever applicable in Paper Layout should be applicable to Web Layout also.
Regards,
Raj -
Date Format changes in Query Designer
Hi friends,
I have one date field that is Keyfigure (not a Time charecterstic) ...now i want to display date in DD- MON - YYYY format... but up to modelling side my date format is DD.MM.YYYY.....
i dont want to change in modelling side.. because.. this required format is needed only for some querys ...
so, can any one suggest me is there any chance to get the date format in the reporting side like this..(27-JAN-2007) ..
helpful answers will be appriciated..
Thanks
BabuHi,
After logon to BW, goto SYSTEM at menu bar.select user profile --> select OWN DATA. You will get Windoe, in that goto default tab, there you change DATE FORMAT and save.
If it useful assign points.
Regards,
sri -
Date format in the file datastore
Hi,
I have source as file, in which I have date column. While creating the file datastore, I have selected the datatype as date & have given the source date format in the format column and it is working fine.
But I have source file coming with different date formats for the same column.
My question is whether i can give multiple date formats in the format column??
1. If yes how to separate the formats i.e with comma or semi-colon or etc...
2. If No, thn how to achieve it. as I can use to_date function, but in that also I have to give all the date formats.Assuming Oracle is target database..
Try this...
1. In your file data store make the column as Varchar2
2. In the interface mapping -- specify the following string in the target column mapping
TO_DATE(REPLACE('2011-06-01','-',''),'YYYYMMDD')
If your target column is date, Oracle will convert database proper format and insert the date..
Hope this works out....
Thanks
Satish
Edited by: user12826256 on 01-Jul-2011 02:15 -
ENDDA system date format on the underlying system
Hi, I have a problem , while my program runs very well on my sytem , it gives problems on other system as the date format on the other system is different. Is there any function to decide the dateformat on the runtime ?
hi,
use the below function modules(Any One) based on your need....
<b>
CONVERT_DATE_TO_EXTERNAL
CONVERT_DATE_TO_INTERNAL</b>
Cheers,
Abdul Hakim -
This is my first mac so I'm still getting my bearings with it. I've only used Windows programmes before. I can't understand why it's so hard to change the date format of the cells in Numbers to keep it showing the UK format. The system preferences of the mac show that it's in the correct region and has the correct date but this doesn't seem to transfer into the Numbers program. I was very impressed with the mac until I discovered this. If anyone knows how I can get the date to stay in the correct format without having to go through the process of altering it in the cell inspector everytime then I would be very grateful.
Numbers & most apps, especially those from Apple, use the date format you have set in System Preferences > Language & Text > Region. You can then choose UK from the Region drop-down list. Mine says Custom because I've defined things further as in the second screenshot.
-
What is the standard format of the query used to bring bw report as iview ?
Please tell me the format of the query used to bring bw report into the portal when we have webtemplateid .
Koti ReddyHI,
It's well described in help,
for EP 6.0 and BW 3.5: http://help.sap.com/saphelp_nw04/helpdata/en/27/6c013a53271a05e10000000a11402f/frameset.htm
for EP 7.0 and BI 7.0 is more difficult, but You have a wizard:
http://help.sap.com/saphelp_nw2004s/helpdata/en/43/ef05462480025ae10000000a1553f7/frameset.htm
http://help.sap.com/saphelp_nw70/helpdata/en/33/39fa40ee14f26fe10000000a1550b0/frameset.htm
Regards,
Jarek -
Hi,
Dates in the Query are retrieved in DD-MON-YYYY format. Is there any option to set for retrieving all dates in the desired format?There is currently no preference for formatting dates returned by queries. However, the dates that are returned are formatted according to the NLS_DATE_FORMAT session variable, which can be changed with the following as an example:
alter session set nls_date_format = 'DD-Mon-YYYY HH24:MI:SS';
If you are selecting timestamps, then you need to alter the NLS_TIMESTAMP_FORMAT, etc - see the NLS_SESSION_PARAMETERS view for the different NLS settings.
Maybe you are looking for
-
We are in the process of planning the deployment of Windows Server 2008 SP2, latest MS updates, and update rollup 13 for Exchange 2007 SP3. Looking to migrate to Exchange 2013 & Exchange online in the future Are there any issues that we need to be a
-
I am doing this simple program. where i have created three menu's and i want it to pop-up a seperate window when i press any of the menu items. till now i have written this code and created the menus, can you please tell me how to attach actionlisten
-
Changing file size for web use - multiple images
My most recent iPhoto event consists of 45 pictures, most of which are 1 MB or larger. I want to scale them down a bit for web use. I do understand how the export command works. If I want to change all 45 pictures at once (select all), where should I
-
Hi All, I have created my first interface using ODI 11g. All looking good in topology navigator . I am simply moving data from one oracle source table to other oracle target table in same database Both source and target are on my Oracle 11g laptop in
-
Ipod video not charging- plugged in all night, screen blinks 3 symbols
Hi, My video iPod is plugged in to my computer (has been all night)and the screen keeps switching eratically. The symbols it switches between are a low battery charge, a small battery with an exclamation, and the apple start up screen. I can also hea