How do get current date/time in GMT?
Is there any way to get the current date and time in GMT (while my current locale is not GMT)?
In Java I can do this:
long currenttime = System.currentTimeMillis();
java.text.SimpleDateFormat df = new java.text.SimpleDateFormat("yyyy/MM/dd HH:mm:ss z");
df.setTimeZone(java.util.TimeZone.getTimeZone("GMT"));
java.util.Date date = new java.util.Date();
date.setTime(currenttime);But, there seems to be no way to do the equivalent in BPEL in SOA Suite.
I did some research and I think I could appy the XPath 2.0 function adjust-dateTime-to-timezone() to the current time, but that function is not available.
Using SOA SUite 11.1.13.0.
THanks.
have you tried changing the stylesheet version in the xsl to 2.0 and then try the function again ?
by changing this version it was possible to use newer functions, which weren't available in the designer
Similar Messages
-
How to get current date for posting date
hi,
how to get current date for posting date ? any sample code ?
ThanksHi......
Use
Select getdate()
for current date.......
Regards,
Rahul -
How to get the date time format in OCI
How to get a date time format in OCI instead of only date
You would have to use the OCIDateTime datatype for this. Refer to
OCI documentation for more details. -
How to put current date time in a JTextField?
Hi all,
I have a problem. How can I put current date time in a JTextField? Pls help me!
Thank you!Hi all,
I have a problem. How can I put current date time in
a JTextField? Pls help me!
Thank you!http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/JTextField.html
http://java.sun.com/j2se/1.4.2/docs/api/java/util/Date.html -
HOW TO DISPLAY CURRENT DATE TIME IN MASTHEAD IN BRANDING IMAGE AREA
Hi experts,
I need to display current date time in masthead also and also i should change the welcome area to my own text there how it is possible.....
and plz tell detail coding also as i dont have idea to change the coding plz help in this............
where to chan ge and how to change.............
waiting for u r responses......................
Regards,
Shilpa.Shilpa,
go to system administratioon-system configuration-support-support desk-browse deployment-check for com.sap.porta.navigation.masthead.par and download it to nwds.
when you import it to NWDS jar file will be missing so you need to manually add that to PORTAL-INF/private/lib.
once you do this go to HeaderiView.jsp in PORTAL-INF/jsp folder.
write
<%= new java.util.Date()%> after <hbj:form id="HeaderForm">.for that matter u can write this at any line after this statement
once you do that select qucik par upload from the tool bar and deploy it.
go to system administration-system configuration-support-support desk-administration console and upload the par file
before following these steps take a backup of par file
reward points if helpful -
How to Get Current Date from MS Access in a Select Statement
From a java method, I want to use JDBC to get the current date from MS Access. In Oracle I would do "select sysdate from dual", but I can't figure out how to do it in MS Access. Here are some of my attempts. I have a table in my Access db called PARM.
// String sql = "SELECT '0', NOW() FROM PARM";
//rs.next() is false
// String sql = "SELECT NOW() AS CURR_DT FROM PARM";
//rs.next() is false
// String sql = "SELECT DATE() AS CURR_DT FROM PARM";
//rs.next() is false
// String sql = "SELECT NOW()";
//StringIndexOutOfBoundsException: String index out of range: -1
// String sql = "select { fn now() } from parm";
String sql = "SELECT Date()";
//java.lang.StringIndexOutOfBoundsException: String index out of range: -1
ResultSet rs = stmt.executeQuery(sql);
if (rs.next()) {
return rs.getString(1);
} else {
return null;
}Why are you getting it as a String? You should be getting it as a timestamp.
Although getString works for me too. There is something else wrong that you haven't shown.
Here is some shoddy, but simple, test code that demonstrates it working.
import java.sql.*;
public class Test{
public static void main(String args[])throws Exception{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection c = DriverManager.getConnection("jdbc:odbc:stats");
Statement s = c.createStatement();
ResultSet rs = s.executeQuery("SELECT NOW()");
while(rs.next()){
System.out.println(rs.getTimestamp(1));
rs.close();
s.close();
c.close();
} -
How to get current date in a specified format ?
Hi,
I want to get the current date (java.util.Date()) in the format yyyy-MM-dd HH:mm:ss.
Can you please tell me as to how to get that ?
RegardsI have used the same and the code looks like this. But i am getting java.text.ParseException : UnParseable Date: "Fri Jul 11 13:29:43 CDT 2003"
The Code is :
java.util.Date sysDate = new java.util.Date();
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String formatted_date = df.format(sysDate);
It is erroring out in the last statement !! -
Pages - How to get current date when opening a template!
I have a stationery template with the date on itl When the template opens can I get it to display the current date.. It so how is that done.
Yes, and the worst:
http://www.freeforum101.com/iworktipsntrick/viewtopic.php?t=424&sid=ba144f60f149 4f75c94316b0c7fbff2b&mforum=iworktipsntrick
If you had Pages previously it should be in your Applications > iWork folder.
Peter -
How to get the date-time value?
Hi All
I have a a field "START_TIME of type DATE". The value stored for that particular field is of the form "10/17/2006 2:23:40 PM" i.e. a date-time value.
Now when i try to get the values stored in the table in which the START_TIME field is defined i get the value in the form of "10/17/2006" .... I missed out the time information. Why is this so? How do i get the complete value as a string?
Thanks in advance. VijayHi All
I have a a field "START_TIME of type DATE". The value stored for that particular
field is of the form "10/17/2006 2:23:40 PM" i.e. a date-time value.Actually it is stored as an internal date format (see my example SQL below, taking note of the dump'ed data).
Now when i try to get the values stored in the table in which the START_TIME field is defined i get the
value in the form of "10/17/2006" ....
I missed out the time information. Why is this so?
How do i get the complete value as a string?The value you see on the screen is the display format and this is determined by the client application that is displaying the date and what settings it is using. If a date column is retrieved from the database then all the data (date and time) is given back, but it's up to the application how that is displayed. e.g. you may see it differently if you view it is SQL*Plus against some other tool such as TOAD.
To change the display settings you can change your NLS_DATE_FORMAT setting or whatever setting is suitable for your client application, or you can use TO_CHAR with a format string to specify the components you want to see. The different with TO_CHAR is that you are converting it to a character string so don't attempt to do any date type comparisons on it after that conversion, e.g. don't try and compare if one date is greater than another, without converting it back to DATE datatype first.
SQL> create table t (x date);
Table created.
SQL> insert into t (x) values (sysdate);
1 row created.
SQL> select x from t;
X
02-JUN-08
SQL> select x, dump(x) from t;
X
DUMP(X)
02-JUN-08
Typ=12 Len=7: 120,108,6,2,13,32,51
SQL> alter session set nls_date_format = 'DD/MM/YYYY HH24:MI:SS';
Session altered.
SQL> select x, dump(x) from t;
X
DUMP(X)
02/06/2008 12:31:50
Typ=12 Len=7: 120,108,6,2,13,32,51
SQL> -
How to get replied date & time of an email
I am using MS outlook 2010 from this month (August 2014), So i work on so many emails from different persons and I want to see time taken to on each email from the time I recieved it till the time I replied. Once I get a column with replied time details;
I can export it to excel so as to report to my manager about my TaT (turn around time), I am new to this forum and this is my first post, please help thanks. (I have browsed here for the same but couldn't get what I need)Hi,
Several suggestions to find the replied date & time:
1. We can find related emails in Outlook, then find the replied date & time from the related emails:
Right click on the message in the list, Select "Find Related" -> "Messages in This Conversation" from the menu that comes up.
2. View tab -> Conversations -> check "Show as conversations", then we can easily find other emails in the conversation, then find the replied date & time.
Anyway, both methods above are manual and based on your request description, I don't think the whole process can be performed with the build-in feature automatically. However, the whole process may be realized via VBA, if you can accept a VBA method, I suggest
you post the detailed request in Outlook for Developers forum:
http://social.msdn.microsoft.com/Forums/office/en-US/home?forum=outlookdev
Regards,
Melon Chen
TechNet Community Support
It's recommended to download and install
Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
programs. -
How to get the date/time of flush shared_pool commands?
I think there´s some script, which in been runned with a privileged user, that is recurring flushing the shared_pool.
Is there a way to know the last date/time when an 'alter system flush shared_pool' was issued?
Or, better, how can I tell Oracle RDBMS to log these commands on alert.log?
Best regards,
Luis SantosYou can audit the alter system commands:
audit alter system;
You probably want to ensure the following two system parameters check the doc for your version:
audit_trail=db_extended
audit_sys_operations=true
They require a system bounce, but by default sys operations are not audited so you'll need the latter.
Query the dba_audit_trail. -
How to assign current date/time to a formula variable in Query Designer
How do I assign the current date to a formula variable in Query Designer? I need to use current data in a calculation and just need the date the report was run.
ThanksHi Philip,
There is an SAP formula variable to supply the current date in a formula. I think it is 0F_ADAY...install it from business content if you cannot see it in the query designer (formula box, under formula variables) and try using it.
Hope this helps... -
How to compute current date/time?
Hi everybody,
I have a page with form that is handled using Automatic Row Processing (DML). I need to put creation date and time into DB. So I created computation on my :P4_CREATION_DATE, type: SQL Query, source: CURRENT_DATE
The problem is that I only get date but I also need time. When I use CURRENT_DATE outside APEX, I got time too. I tried CURRENT_TIMESTAMP as source (ORA-01830: date format picture ends before converting entire input string) and setting Format Mask to this item, but I still can't get date AND time in my computation.
Any suggestions?
Thx.Adam,
The easist way is to create a trigger on the table that populates the date using sysdate. Remember that the fields in Apex are strings.
Keep Smiling,
Bob R -
How to get current time and date??
How to get current time and date from my PC time and date to the java application??
i use java.util.* package but got error, that is:
- java.util.* and java.sql.* class are match
- abstract class cannot be instantiated
so what can i do, pls guide...thanks...There is a method in the System class that will return the current system time. You could also instantiate a Date, Time, Timestamp, or Calendar object, all of which get created with the system time by default.
Don't import *. Import the specific classes you need.
Next time, post the actual text of the exceptions/compile errors. If you make people guess, most just won't bother. -
How to get Client(browser) current date/time in BIP report
Hi,
I need to display report generated date in BIP report and this should be client(browser) current date/time. I tried the following things.
1. have used MS Word Native Date/time using Insert->Date/Time. And we have chosen the M/d/yyyy h:mm:ss am/pm format. but it is printing BIp server date/time, not client date/time.
2. <?xdofx:sysdate?>, <?xdoxslt:sysdate_as_xsdformat()?> and <?format-date:xdoxslt:sysdate_as_xsdformat();'SHORT_TIME'?> are giving GMT Date/Time, but we need client Date/Time.
3.<?xdoxslt:sysdate('DD-MON-YYYY HH12:mi:ss')?> is giving the system date/time of the machine where BIP server is installed.
Could you provide some help in this??
Thanks
HariHello, Hari,
what would return something like this:
Execution date:
<?xdoxslt:current_date('ja-JP', 'Asia/Tokyo')?>
<?xdoxslt:current_time('ja-JP', 'Asia/Tokyo')?>
@Vetsrini,
for my opinion,
in the countries where time is switching (winter/summer) using the hard coded time zones in the format-date() cause a problem:
for example:
if we enter the date in date prompt in summer it will return PM_DT = 2010-07-20T00:00:00.000+04:00
in winter 2010-07-20T00:00:00.000+03:00, so,
using <?format-date:PM_DT;'DD.MM.YYYY';'GMT+3'?> return 2010-07-20 in winter and 2010-07-19 in summer.
regards,
Eldar A.
Maybe you are looking for
-
Edit User Profile How do I enalble user lo loggin to their own profile page and edit it?
Hi I am having some problems....... any help would be nice I am using DWCS3 and ADDT toolbox extension wamp and phpmyadmin I am trying to create a site for people to be able to post a profile with a picture and info and display it in a dynamic table.
-
hi Friends, I am Using ME_PROCESS_PO_CUST badi for validation in Purchase oreder (ME21N), For that I implementaed PROCESS_ITEM method which fires during each row now i want to add another validation in same implimentation for that i need privious row
-
I accidentally clicked on HP Utilities (from my Macbook) the "Disenable All" botton for HP printer & scanner. Now all of the functions (such as wireless communication) and features (every bottons on printer's touchscreen) are locked up. The message s
-
Problem using LV 8.0.x with Delcom USB Visual Signal Indicator
This could end up being more of a general question about USB and LabVIEW 8.0.x. I have a USB Visual Signal Indicator from Delcom that doesn't function properly under either LV 8.0 or 8.0.1. I've had to revert back to LV 7.1 where it works fine. Ple
-
Branch wise Trading Account for Manufacturing industry
Dear SAP FICO Experts One of my client is required Trading account statement seperately for calculating gross profit (including other direct expenses) We are using perpectual Inventory method for this client, and in this method SAP is calculating the