How to access date with respective to different language
Hello,
In my database i stored the date in the following format1992-03-28 13:07:53.000.
In My application user can use upto 8 languages.Now the problem is when the user logged in with english the date format will be like 5/26/08(dd/mm/yy).but me convert this format to 05/26/2008(dd/mm/yyyy) through and use the following syntax for constrains dateformat(MaoDate,'mm/dd/yyyy') = '05/26/2008'
Now my problem is for some other language the date format is like Arr 20 07 or 25.05.92.But me wrote the code conversion only for the format mm/dd/yy.
Is there any general way to acces the date for all the languages?
Please help Me.
Thank You!!!
Hello sathish,
Now the problem is i will get the string like 5/8/08 or Jan 21 07 .... from My GUI. But me wrote code only to convert from 5/8/08 to 05/08/2008...Bcz date comparison was happening in dd/mm/yyyy format.
But whenever i am getting data like Jan 21 07 from GUI my conversion is not happening.And now the date constrain is dateformat(MaoDate,'mm/dd/yyyy') = 'Jan 21 07' i mean my code checking the date format with dd/mm/yyyy with date Jan 21 07.
So i need to write a code to convert all the regional format to dd/mm/yyyy.So is there any common way to comapre the date with all regional format!!!!!!
Thank You!!
Similar Messages
-
How to get dates with respect to System Date?
Hello,
I am trying to get Date value after 30 days of my System current date. I am using
System.out.println(new java.util.Date(System.currentTimeMillis()+30*3600*24*1000));
but I am not getting correct date.
Suppose my system date is 15July then after executing this code I should get 14Aug, but it is giving a date of month June.
Please suggest solution for this.
Thanks,
NiketThis doesn't have anything to do with the Collections Frameworks. You should direct this type of question to "Java Programming".
Here is the code you're looking for anyway...
import java.util.*;
import java.text.*;
public class thirty
public static void main(String[] args) throws ParseException
Calendar todaysdate = new GregorianCalendar();
SimpleDateFormat sdf = new SimpleDateFormat("MM/dd/yyyy");
System.out.println("today's date: " + sdf.format(todaysdate.getTime()));
todaysdate.add(Calendar.DATE, 30);
System.out.println("thirty days later: " + sdf.format(todaysdate.getTime()));
} -
SAPUI5 , how to access data with autocomplete request
Dear All,
I have created a OPENUI5 page with sap.autocomplete,
Also a 'page with flow logic' with onRequest defined.
How could the two be linked together, such that the autocomplete will make request to the 'page with flow logic'.
ThanksSolved.
Done through JsonModel loaddata -
How to access Data Guard option in Oracle 10g OEM
Hi All,
I have Oracle 10g ENTERPRISE EDITION on Unix envoirement. I want to setup logical standby Database through Data Guard technology. But when I brows through OEM I do not find Link for DATA GUARD????
1) How to access Data Guard option from oracle 10g OEM.
2) Does It come with Enterprise Edition OR I have to install it separately.
Regards,
DarshanI am managing almost everything through EM Grid Control. It is easy to setup and configure.
Anyways, if you have read the documentation on
Oracle® Data Guard Concepts and Administration and setup your environment accordingly then you should not have any problems. Atleast I can assure you that your production database will not be affected by it.
Just make sure that you follow each step and read thoroughly. If you have spare machines then you can test and record your configuration before performing it on your production db. This link will provide you with the information on DataGuard.
http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14239/concepts.htm
If you think that way then you will never be able to do any new stuff since you will always fear that something might go wrong. Go ahead pal, try it on test machines and you will know that it is not that difficult.
There are real experts who help people like us in this forum and I know that they are doing a pretty good job.
All the best.
Rgds
Adnan -
Validation of service entry date with respect to po date
i want to validate the service entrysheet date with respect to Purchase order date.
service entry sheet should not be before po date(doc date).
SRVESSR- name of user exit for service entry sheet.
but it is not triggering ,
suggest me how to do .
if sy-tcode = 'ML81N'.
if i_ekpo-werks = '5000' or i_ekpo-werks = '4000' or i_ekpo-werks = '6000'.
if C_ESSR-BUDAT < I_EKKO-BEDAT.
message 'Service Entry sheet Psting data should not be before PO Date' type 'E'.
endif.
endif.Hi shaiz.
Try to under the concept of schduling During MRP run,
Scheduling will be done for FG with respect to scheduling data maintained for FG material. It will not consider the planned delevery time of its child materail.
Requirement date is created for FG only, on this date FG should be deliverd to stock.
u have to plan raw material to meet requirement date.
System will not reschedule FG order automatically if raw delivery time is delayed it will give exception message only to reschedule. You have to reschedule FG order with respect to delivery date of ROH manually by doing material avilablity check.
I hope this should have given some idea
Regards
Pradeep -
How to get data with the raw pattern from resultset ?
would you tell me how to get data with the raw pattern from resultset ?
thank you in advance!
longgger2000I tried getBytes() and getObject()
, but I can not get the right result , for example the
data in oracle database is 01000000DFFF, when In used
the method of getBytes() and getObject(), I get the
result of [B@1c2e8a4, very different , please tell me
why !
thank you
longgger2000
[B is byte arrayseem that it return an bytes array for you. -
Hi,
In one of my dll (VS2010), the process Skipping target "MetaGen" because all output files are up-to-date with respect to the input files.
it is at random. I have checked the time stamps of the dll and metagen.write.1.tlog both having the time stamp on the failed build. But all files in release folder did not have the same time. They are one hour earlier than the dll
and the metagen.write.1.tlog.
On the good build it said the input file is is newer than output file ".\Release\\metagen.write.1.tlog" and allfiles in the release folder have same time stamp.
Any clue to solve this ?
Regards,Hi,
Based on your post, I am not very clear about your issue. I feel your issue is out of support range of VS General Question forum which mainly discusses
the usage of Visual Studio IDE such as WPF & SL designer, Visual Studio Guidance Automation Toolkit, Developer Documentation and Help System
and Visual Studio Editor.
Could you please provide us more information so that we resolve your issue better?
What type of project are you working with? C++ MFC project?
How was the
metagen.write.1.tlog file generated in your project?
What error messages did you get?
What is the 'input file'?
If possible, please provide us a sample project to reproduce your issue.
Thanks,
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
Open Hub: How-to doc "How to Extract data with Open Hub to a Logical File"
Hi all,
We are using open hub to download transaction files from infocubes to application server, and would like to have filename which is dynamic based period and year, i.e. period and year of the transaction data to be downloaded.
I understand we could use logical file for this purpose. However we are not sure how to have the period and year to be dynamically derived in filename.
I have read in sdn a number of posted messages on a similar topic and many have suggested a 'How-to' paper titled "How to Extract data with Open Hub to a Logical Filename". However i could not seem to be able to get document from the link given.
Just wonder if anyone has the correct or latest link to the document, or would appreciate if you could share the document with all in sdn if you have a copy.
Many thanks and best regards,
VictoriaHi,
After creating open hub press F1 in Application server file name text box from the help window there u Click on Maintain 'Client independent file names and file paths' then u will be taken to the Implementation guide screen > click on Cross client maintanance of file name > create a logical file path by clicking on new entiries > after creating logical file path now go to Logical file name definition there give your Logical file , name , physical file (ur file name followed by month or year what ever is applicable (press f1 for more info)) , data format (ASC) , application area (BW) and logical path (choose from F4 selection which u have created first), now goto Assignment of physical path to logical path > give syntax group >physical path is the path u gave at logical file name definition.
however we have created a logical path file name to identify the file by sys date but ur requirement seems to be of dynamic date of tranaction data...may u can achieve this by creating a variable. U can see the help from F1 that would be of much help to u. All the above steps i have explained will help u create a dynamic logical file.
hope this helps u to some extent.
Regards -
How to export data with column headers in sql server 2008 with bcp command?
Hi all,
I want know "how to export data with column headers in sql server 2008 with bcp command", I know how to import data with import and export wizard. when i
am trying to import data with bcp command data has been copied but column names are not came.
I am using the below query:-
EXEC master..xp_cmdshell
'BCP "SELECT * FROM [tempdb].[dbo].[VBAS_ErrorLog] " QUERYOUT "D:\Temp\SQLServer.log" -c -t , -T -S SERVER-A'
Thanks,
SAAD.Hi All,
I have done as per your suggestion but here i have face the below problem, in print statment it give correct query, in EXEC ( EXEC master..xp_cmdshell @BCPCMD) it was displayed error message like below
DECLARE @BCPCMD
nvarchar(4000)
DECLARE @BCPCMD1
nvarchar(4000)
DECLARE @BCPCMD2
nvarchar(4000)
DECLARE @SQLEXPRESS
varchar(50)
DECLARE @filepath
nvarchar(150),@SQLServer
varchar(50)
SET @filepath
= N'"D:\Temp\LDH_SQLErrorlog_'+CAST(YEAR(GETDATE())
as varchar(4))
+RIGHT('00'+CAST(MONTH(GETDATE())
as varchar(2)),2)
+RIGHT('00'+CAST(DAY(GETDATE())
as varchar(2)),2)+'.log" '
Set @SQLServer
=(SELECT
@@SERVERNAME)
SELECT @BCPCMD1
= '''BCP "SELECT
* FROM [tempdb].[dbo].[wErrorLog] " QUERYOUT '
SELECT @BCPCMD2
= '-c -t , -T -S '
+ @SQLServer +
SET @BCPCMD
= @BCPCMD1+ @filepath
+ @BCPCMD2
Print @BCPCMD
-- Print out below
'BCP "SELECT
* FROM [tempdb].[dbo].[wErrorLog] " QUERYOUT "D:\Temp\LDH_SQLErrorlog_20130313.log" -c -t , -T -S servername'
EXEC
master..xp_cmdshell
@BCPCMD
''BCP' is not recognized as an internal or external command,
operable program or batch file.
NULL
if i copy the print ourt put like below and excecute the CMD it was working fine, could you please suggest me what is the problem in above query.
EXEC
master..xp_cmdshell
'BCP "SELECT * FROM
[tempdb].[dbo].[wErrorLog] " QUERYOUT "D:\Temp\LDH_SQLErrorlog_20130313.log" -c -t , -T -S servername '
Thanks, SAAD. -
How to add date with month after convert number to month?
How to add date with month after convert number to month?
Month Date Result
24 21/11/09 24*(21/11/09)
I want to add both the column and result should be 21/11/11
Thanks
NiharHmm,
Because, you are using YYYY for '09'.
SQL> ed
Wrote file afiedt.buf
1* select to_char(to_date('10/01/09','DD/MM/RRRR'),'DD/MM/YYYY') from dual
SQL> /
TO_CHAR(TO
10/01/2009
SQL> ed
Wrote file afiedt.buf
1* select to_char(to_date('10/01/09','DD/MM/YYYY'),'DD/MM/YYYY') from dual
SQL> /
TO_CHAR(TO
10/01/0009Or with Add_months
SQL> ed
Wrote file afiedt.buf
1* select to_char(add_months(to_date('10/01/09','DD/MM/YYYY'),36),'DD/MM/YYYY') from dual
SQL> /
TO_CHAR(AD
10/01/0012
SQL> ed
Wrote file afiedt.buf
1* select to_char(add_months(to_date('10/01/09','DD/MM/RRRR'),36),'DD/MM/YYYY') from dual
SQL> /
TO_CHAR(AD
10/01/2012-Arun -
How can access data in rman output file "daily.log"
Hi All,
i did use following query for rman out
output file "daily.log" has been created,but does not exist data.
how can access data in output file "daily.log"
bash-3.00$ sh rmant.sh
Recovery Manager: Release 10.2.0.3.0 - Production on Thu Jun 30 16:54:16 2011
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: DEV (DBID=45558086)
RMAN> Spool log to daily.log;
2> run
3> {
4> backup databas;
5>}
6> spool log off;
7>
Spooling started in log file: daily.log
Recovery Manager10.2.0.3.0
Starting backup at 30-JUN-11
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=634 devtype=DISK
channel ORA_DISK_1: starting compressed incremental level 0 datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00014 name=/u02/proddata/a_int01.dbf
input datafile fno=00022 name=/u02/proddata/a_txn_data01.dbf
input datafile fno=00023 name=/u02/proddata/a_txn_data02.dbf
input datafile fno=00024 name=/u02/proddata/a_txn_data03.dbf
input datafile fno=00039 name=/u02/proddata/a_txn_data04.dbf
input datafile fno=00038 name=/u02/proddata/undo02.dbf
input datafile fno=00027 name=/u02/proddata/a_txn_ind03.dbf
input datafile fno=00028 name=/u02/proddata/a_txn_ind04.dbf
input datafile fno=00012 name=/u02/proddata/undo01.dbf
input datafile fno=00015 name=/u02/proddata/a_media01.dbf
input datafile fno=00025 name=/u02/proddata/a_txn_ind01.dbf
input datafile fno=00026 name=/u02/proddata/a_txn_ind02.dbf
input datafile fno=00029 name=/u02/proddata/a_txn_ind05.dbf
input datafile fno=00021 name=/u02/proddata/a_summ01.dbf
input datafile fno=00019 name=/u02/proddata/a_ref01.dbf
input datafile fno=00020 name=/u02/proddata/a_ref02.dbf
input datafile fno=00001 name=/u02/proddata/system01.dbf
input datafile fno=00002 name=/u02/proddata/system02.dbf
input datafile fno=00003 name=/u02/proddata/system03.dbf
input datafile fno=00004 name=/u02/proddata/system04.dbf
input datafile fno=00005 name=/u02/proddata/system05.dbf
input datafile fno=00006 name=/u02/proddata/system06.dbf
input datafile fno=00007 name=/u02/proddata/system07.dbf
input datafile fno=00008 name=/u02/proddata/system08.dbf
input datafile fno=00009 name=/u02/proddata/system09.dbf
input datafile fno=00010 name=/u02/proddata/system10.dbf
input datafile fno=00011 name=/u02/proddata/system11.dbf
input datafile fno=00013 name=/u02/proddata/a_archive01.dbf
input datafile fno=00036 name=/u02/proddata/sysaux01.dbf
input datafile fno=00016 name=/u02/proddata/a_nolog01.dbf
input datafile fno=00037 name=/u02/proddata/izu01.dbf
input datafile fno=00017 name=/u02/proddata/a_queue01.dbf
input datafile fno=00018 name=/u02/proddata/a_queue02.dbf
input datafile fno=00031 name=/u02/proddata/odm.dbf
input datafile fno=00034 name=/u02/proddata/portal01.dbf
input datafile fno=00035 name=/u02/proddata/sfx01.dbf
input datafile fno=00030 name=/u02/proddata/ctxd01.dbf
input datafile fno=00032 name=/u02/proddata/olap.dbf
input datafile fno=00033 name=/u02/proddata/owad01.dbf
channel ORA_DISK_1: starting piece 1 at 30-JUN-11
channel ORA_DISK_1: finished piece 1 at 30-JUN-11
piece handle=/sw/weekly_cum_database_DEV_t755196858_c1_s24_p1 tag=WEEKLY_CUM_DAT
ABASE comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:32:55
channel ORA_DISK_1: starting compressed incremental level 0 datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
including current control file in backupset
including current SPFILE in backupset
channel ORA_DISK_1: starting piece 1 at 30-JUN-11
channel ORA_DISK_1: finished piece 1 at 30-JUN-11
piece handle=/sw/weekly_cum_database_DEV_t755198834_c1_s25_p1 tag=WEEKLY_CUM_DAT
ABASE comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02
Finished backup at 30-JUN-11
Spooling for log turned off
Recovery Manager10.2.0.3.0
Recovery Manager complete.
bash-3.00$i did try this but it hangs
bash-3.00$ sh rmant.sh
Recovery Manager: Release 10.2.0.3.0 - Production on Fri Jul 1 10:52:01 2011
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: DEV (DBID=45558086)
RMAN> Spool log to 'daily' append;
2> run
3> {
4> backup as backupset
5> incremental level=0 cumulative
6> device type disk
7> tag "weekly_cum_database"
8> format '/sw/weekly_cum_database_%d_t%t_c%c_s%s_p%p'
9> database;
10> }
11> -
i am tryin to access old macbookpro harddisk on macbook air,when i connect it via usb i see the folders,but i dont see any files e.g. my saved photos,movies,docs are not there,its shows that 220gb is used,but no data is visible...all folder are empty.......can someone pls adv how to access data?
i am tryin to access old macbookpro harddisk on macbook air,when i connect it via usb i see the folders,but i dont see any files e.g. my saved photos,movies,docs are not there,its shows that 220gb is used,but no data is visible...all folder are empty.......can someone pls adv how to access data?
-
How to access data in different server with flex3 remoteobject
I am trying to access data from cfc that is in different pc
through network and coldfusion 8, flex3 and sql server are in diff.
pcs. So how can I access the cfc file in different pc using remote
object which will return the data from another server using dsn? I
can connect to the service if coldfusion and flex are kept in same
pc. How can I access it in diff. pc?what will be destination and
source param values?
Any help is appreciated.Hi,
You should be able to achieve this by changing the end point
URL of the channel you are using in the services-config.xml. The
end point URL should point to the server where your CF is deployed.
Hope this helps. -
How to read data with different XML schemas within the single connection?
I have Oracle 11g database
I access it through jdbc:oracle:thin, version 11.2.0.3, same as xdb.
I have several tables, each has one XMLType column, all schema-based.
There are three different XML schemata registered in the DB
I may need to read the XML data from several tables.
If all the XMLTypes have the same XML schema ,there is no problem,
If the schemata are different, the second read throws BindXMLException.
If I reset the connection between the reads of the XMLType column with different schemata, it works.
The question is: how can I configure the driver, or the connection to be able to read the data with different XML schemata without resetting the connection (which is expensive).
The code to get the XMLType data is textbook implementation:
1 ResultSet resultSet = statement.executeQuery( sql ) ;
2 String result = null ;
3 while(resultSet.next()) {
4 SQLXML sqlxml = resultSet.getSQLXML(1) ;
5 result = sqlxml.getString() ;
6 sqlxml.free();
7 }
8 resultSet.close();
9 return result ;It turns out, that I needed to serialize the XML on the server and read it as Blob. Like this:
1 final Statement statement = connection.createStatement() ;
2 final String sql = String.format("select xmlserialize(content xml_content_column as blob encoding 'UTF-8') from %s where key='%s'", table, key ) ;
3 ResultSet resultSet = statement.executeQuery( sql ) ;
4 String result = null ;
5 while(resultSet.next()) {
6 Blob blob = resultSet.getBlob( 1 );
7 InputStream inputStream = blob.getBinaryStream();
8 result = new Scanner( inputStream ).useDelimiter( "\\A" ).next();
9 inputStream.close();
10 blob.free();
11 }
12 resultSet.close();
13 statement.close();
14
15 System.out.println( result );
16 return result ;
17
Then it works. Still, can't get it work with XMLType in resultset.On the client unwrapping XML blows up when trying to switch to different XML schema. JDBC/XDB problem? -
Hi
As the questions states, how do I average data with 78,74,73 and 55 points respectively and obtain an array of 78 points?
When I use the plus vi, Labview somehow produces an array of 55 points when I do the average (see attached vi).
I have been unlucky in trying to get good results.
Can anyone help?
Thank you.
Attachments:
average4.vi 40 KBThe add function is polymorphic. It accepts arrays as well as numerics, but you need to understand one thing about array operations in LV. Operations performed on arrays of different sizes will always (I think) work based on the smallest array. For example, if you auto index 2 arrays of different sizes into a for loop, the number of times the loop will run will be the size of the small array. The same is true here - when you wire 2 arrays of different sizes to the add function, only the first N elements of the larger array get processed. The rest are dumped. That's why you get 55 elements.
Attached is a modification of your VI which shows 2 things:
The bottom part is your algorithm, only cleaned up. Note how much easier it would be to read now. You should always write clean code. Also, note that I have changed the representation on some of the data from DBL to I32. This is because this is the representation the array function work with and your code had the DBLs coerced for no reason.
The top part is a different algorithm which should do what you want. Note that like Mike said, the arrays with smaller sizes will have 0s appended at the end, so if you want to avoid that, you will have to modify the last part, where the averaging is done and only divide those columns which are long enough.
To learn more about LabVIEW, I suggest you try searching this site and google for LabVIEW tutorials. Here and here are a couple you can start with. You can also contact your local NI office and join one of their courses.
In addition, I suggest you read the LabVIEW style guide and the LabVIEW user manual (Help>>Search the LabVIEW Bookshelf).
Try to take over the world!
Attachments:
average4MOD.vi 63 KB
Maybe you are looking for
-
Recording Audio from Video Tape
Hi! I want to record audio from a video tape and put the audio into my imovie. I have done this funtion before, but I can't seem to remember how! I am able to play the movie (the video tape) in a VCR which then goes through my "bridge" (DV Converter)
-
Auto Quality Notification and Return Delivery Via Usage Decision
Hello Gurus Need help ! I am using the Quality inspection with Material Specification. Just an overview of my current system settings - Inspection Type 101 for Purchased parts , My Inspection characteristics and Batch Charracteristics are linked .Bat
-
My Macbook Pro's iTunes App was logged in as someone else. I logged out of that account and logged into mine, but I found that the app still shows all of the previous account's content. None of my apps, songs, or movies are there! iTunes 12.1.0.50 on
-
Does the Mac Mini have some issues with USB mics?
Hi there, I've been having issues getting my Mac Mini to register my Logitech usb headset. I originally thought it was an issue with Mavericks, but when I tested the headset on my friends Macbook, it works fine. I tried using my iPhone headphones i
-
I have tried the above resolution and it said that the command was not found. Please help