How to get the current date ? in the form of dd/mm/yyyy?
Hi all,
As getDate( ), getMonth( ), and getYear( ) is depricated, how to get the current date or System date, month and year ? please help ??
Regards
Ashvini
HI,
Than u for the reply. But i am getting one error.
as u said, I tried to do so.........
but, i am getting one error.
code
Calendar cald=(Calendar.getInstance.getTime());
out.println(cald);
error message
validate$jsp.java:86: Attempt to reference method getInstance in class java.util.Calendar as an instance variable.
Calendar cald=(Calendar.getInstance.getTime());
^
1 error
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:284)
Pls help
Regards,
Ashvini
Similar Messages
-
How to get the current Date from the system?
How do I acquire the current date from the system? Also, if possible, can I assign the day, month and year separately into three variables and how? It would be thankful if some simple Example could be given. Thanx!
import java.util.*;
public class count {
public count() {
Calendar now = Calendar.getInstance();
int month = now.get(Calendar.MONTH);
int day = now.get(Calendar.DAY_OF_MONTH);
int dayyear = now.get(Calendar.DAY_OF_YEAR);
int year = now.get(Calendar.YEAR);
int a = 365;
int b = a - dayyear;
System.out.println("The day is the" + " " + day);
System.out.println("IT is the" + " " + month + " " + "month of the year");
System.out.println("The year is" + " " + year);
System.out.println("This many days till next year" + " " + b);
public static void main(String[] args) {
count cou = new count();
} -
How to display the current date in the prompt value.
Hi,
How to display the current date in the prompt value. When the user runs the query he want the current date to be displayed in the prompt value and he should also be able to change the date if required ...... I am using web Intellegency BO XI3.0.
Thanks,
Shakthi.Please refer the below link.
Prompt with default date ( currentdate-1 and current date-8)
http://www.dagira.com/2008/07/15/how-can-i-make-today-my-default-prompt-value/
http://www.dagira.com/2008/07/21/using-a-magic-date-value-in-prompts/
Regards,
Bilahari -
Variant must get the current date from the system.
Hi All,
I really appreciate your help on below please;
I need to create a variant and schedule a report program once a day.
But variant must get the current date from the system (sy-datum).
The program should run for the values in the variant in schedule job run;
Can I do this using SAP variants (for Report Program) and schedule the job.
Many thanks
IverStandard functionality.
http://help.sap.com/saphelp_nw70/helpdata/en/c0/98039be58611d194cc00a0c94260a5/frameset.htm
Thomas -
How to show the Current Date in the Screen as default
Hi all,
This is may be simple to u all, but i need the solution for this,
I want to show the Current date in the Screen, i am using the structure. but the calendar control showing when i run the program. But i want to show the current date as default.
Thanks
ShankarIs this a screen or a report?
If its a report, try assigning DEFAULT sy-datum (to the parameter/select-option name)
If its a screen field, try writing this in the PBO:
IF fieldname IS INITIAL.
fieldname = sy-datum.
ENDIF.
Hope this helps.
Sudha -
How to get the "current date" in the BEx?
Hi all,
I need to get the "current date" in my Bex report in order to make a comparison. I know there is a "How to" which shows how to get the current date via a User Exit, but I didn't find it. Could you please help me?
Thanks1. Create a New Formula in Key Figures structure
2. Give tech name and description and Select "New variable" option
3. Next screen will launch Variable Wizard -> create a new variable with replacement path as processing type
4. in next screene select the date characteristic that represents the first date to use in the calculation (From Date)
5. In the next screen select Key in the Replace Variable with field. Leave all the other options as they are
6. In the next Currencies and Units screen select Date as the Dimension ID.
6. Save variable
repeate the Above steps to create another variable (To Date)
and now you can use these two new replacement path variables in your new formula.
Dev -
Not able to get the current data from the screen
Hello All,
I have created a table view on a value node. I edit a field which has a date F4 help or a field DDLB and click SAVE.
In the save event handler I am using get first statement in the loop and when I see the contents of the entity it is the old data not the new values.
Could you please help me on this ?
Regards
SohitHi Sohit,
Use GET_CURRENT method of CL_CRM_BOL_ENTITY and try.....
(make sure the Setter method is updating the values)
Regards,
Masood Imrani S. -
How to get a current date timestamp ?
Hi,
I need to get the current date timestamp in a format DDMMYY HH:MM:SS.mmmm and store it in an Oracle column which is declared as of type DATE.
Also i need to store this timestamp in a string format.
Please give your inputs in this regard, which is appreciated.
RegardsDates dont' have formats. String represenations of dates do.
If you have a DB column that is of char or varchar type but represents a date/time, you should change your data model so that the column type is date or time or timestamp. If you can't do that, and need to put a date into a particular format, use java.text.SimpleDateFormat.
To get the current date and time, look at System.currentTimeMillis, java.util.Date, java.sql.Date, java.sql.Timestamp.
To put one of these into a database, use PreparedStatement. For example, a timestamp would be something like this: PreparedStatement ps = con.prepareStatement("insert into some_table (some_timestamp) values(?)");
Timestamp ts = new TimeStamp(...);
ps.setTimestamp(1, ts);
ps.excuteUpdate(); -
How to get the date starting from 1 to the current date from the system dat
Dear all,
Please tell me how to get the date starting from 1 based on the system date
and it should come with respect of time also.
example.
suppose today is 6 Dec, 2006
so ABAP report should find the 1 dec. 2006.
Please help me as soon as possible.
Regards,concatenate sy-datum0(2) '01' sy-datum4(4) into v_firstdate.
or yo ucan use the fm:
HR_JP_MONTH_BEGIN_END_DATE
usage:
call function 'HR_JP_MONTH_BEGIN_END_DATE'
exporting
iv_date = sy-datum
importing
ev_month_begin_date = gv_begda
ev_month_end_date = gv_endda.
Regards,
Ravi
Message was edited by:
Ravi Kanth Talagana -
How to get last login date of the user
Hi,
I have an application where i need the last login date of the user and if the differance between the last login date and the system date is greater than a certain range the user account should be locked automatically.Please suggest me how resolve the problem as early as possible.
Thanks and Regards
AniruddhaHi,
We have faced the same issue earlier. Some attributes are available in SAP API, but they are depricated by sap due to some performance issue.
Below solution will be helpful:
So we have implmented custom code in our application. We have developed one webdynpro application which will retrieve update & retrieve logon time from portal database(custom table). And we have integrated this application in desktop inner page. So this application will be invisible to the user and will executed first time when user logs into the portal.
Regards,
Charan -
Af:inputDate - No provision to set the set the current date in the popup
On clicking the icon of the af:inputDate, the pop up is opened with the current month/date/year as the highlighted item. There should be provision to set which date/month/year should be shown as highlighted.
The attached image below makes it more clear.Can't upload images
-
Keeping the current date in the dock
When I first started to use iCal once opened the date would stay in the dock but now after i quit the date changes back to July 17(the day in 2002 iCal was released.) Before one of the updates the correct date would only change back if I forced quit. thanks in advance.
Welcome to Apple Discussions.
Please refer to this thread from earlier today:
http://discussions.apple.com/thread.jspa?threadID=249836&tstart=0 -
How to get Most current record in the reporting
Hi All,
I have reporting requiremnt like to get the most recent record.
Please see the below example we have 3 records but with 2 different sales represtentatives assigened to the same document.but i need to get most recently assigned sales representative record that is number 2(10726056 and status open).
Now i am geeting the 2 open records .Need to get only one.we do not have any other difference in the records to keep track of the sales representatives assignment to get the new sales rep id other than request id.
Can any one tell me most rcurrent data varibles under the request id do.Will it solves my issues o r any other ideas please welcome.
Customer No Sales rep Doc number Status Request id
0000613086 10726056 9000783660 C REQU_1
0000613086 10726056 9000783660 O REQU_1
0000613086 10182679 9000783660 O REQU_2Hi Sirisha,
it seems to be a problem of the kind "exception aggregation" , but let me say it can result in a very complex solution.
What about using a Virtual Infoprovider with servicecs to solve the issue?
You should create an additional InfoCube that reads form the basic one (where you have data) and then you should "delete" invalid records considering the request number.
By the way time stamp seems to be the easier solution.
Hope it helps
GFV -
With the following piece of code, I am able to get the current date in bpe forms, but not when I put it in any of the forms logged in using end user(not even in end user menu).
<Field name='request.submitDate'>
<Display class='Label'>
<Property name='value'>
<invoke name='dateToString' class='com.waveset.util.Util'>
<ref>java.util.Date</ref>
</invoke>
</Property>
</Display>
</Field>
The following error is getting displayed in the end user menu form.
XPRESS exception:
Can't call method dateToString on class com.waveset.util.Util ==> java.lang.NullPointerException: -------can anyone please help me out
or can anyone suggest a way for getting the current date
Regards
Gajendra NagapurkarThe <ref> tag is used to refer to the value of some variable. The value of the variable java.util.Date in your example is NULL, because it doesn't exist!
If you remove that argument from your <invoke>, the call resolves to the method com.waveset.util.Util.dateToString() and will return something like "20050810 11:00:21". -
I have adobe 9 pro. I am currently adding fields to a document and would like my date field to display the current date when the document is opened so that the user does not have to enter the date each time. How do I do that?
Have you searched for this issue. It has been answered many times.
Example Acrobat JavaScripts
Scroll down to the . Insert Today's Date into Form Field section. -
Regarding subtraction of 10 days from the current date
Need to know how I can get 10 days subtracted from the current date before the report is excuted. This needs to appear in the selection screen before the report is excuted.
The select option contains two fields the first field is the date which is 10 days subtracted from the current date and the next field is the current date.
Please suggest.
Thanks.Hi Dolly
I had a same req before check that code:
AT SELECTION-SCREEN OUTPUT.
IF pa_older = 'X'.
CALL FUNCTION 'RP_CALC_DATE_IN_INTERVAL'
EXPORTING
date = pa_end "<<<<< date or in ur case sy-datum
days = '10'
months = '00'
signum = '-'
years = '00'
IMPORTING
calc_date = pa_end1. " <<< subtracted date
ENDIF.
Maybe you are looking for
-
DVD's & CD's not reading, but the drive will open and close
Hello, When I put the CD's or DVD's in, the drive tries for about 10 seconds, but then spits back out whatever the disk is. I searched other posts and I'm gathering I may have a failed superdrive. In there anything I can try before getting it repaire
-
Added Spry menu in CS3, site is entirely blank in IE 6 or 7, fine in FF, mac
I've about had it. Built a site, posted here with some issues with a P7 menu adding blue bar. I deleted all the P7 code...page was back to normal, but without a navigation bar. So, I added one of the new Spry bars in DW, set it all up, tested it on m
-
Mail Erased Accounts and Now the System is Acting Strange
I just reinstalled Tiger after it crashed last week. A few days ago my wife was prompted to do something when I wasn't around and it wiped out our two Mail accounts. I reinstalled the accounts but ever since odd things are happening. 1) One account s
-
Xorg.conf multiple monitors different refresh rates
I have two monitors on my setup, with my primary montor being to the right of my secondary. They both have resolution 1920x1080. I'm trying to get my primary monitor to run at 120 Hz but it's only doing 60. My secondary monitor is a different model t
-
Earphones not working properly
Hey, The earphones on my iPod Nano don't seem to be working well anymore. The left one is a lot quieter then the right one. Would I get new ones if I go back to the store? Or not? My iPod is still under warranty. Thanks.