Time Object Conversion

Hi,
I want to convert the date like 'now' to Time Object in a specific format ("yyyy-MM-dd hh:mm:ss")
I wrote the following code.
Time date;
date = (Time) 'now';
Time test = (Time) date.format(mask : "yyyy-MM-dd hh:mm:ss");
logMessage("Result: " + test);
Output is: Result: 2010-05-12 10:35:33+05:30
Here I do not want the +05:30 as I mask it in "yyyy-MM-dd hh:mm:ss" format.
Bibhu

It's being overly helpful by including your timezone.
Try this instead. The display statement is just in there for debugging purposes. Take it out once you see you've got it working on your end.
Time myDate;
myDate = 'now';
String myTimeString;
myTimeString = myDate.format(mask : "yyyy-MM-dd hh:mm:ss");
display("Result: " + myTimeString);Dan

Similar Messages

  • I have the converter to change pdf to word. Works sometime, other time says conversion is taking too long. Can I get what it has translated so I can use the parts?

    I have the converter to change pdf to word. Works sometime, other time says conversion is taking too long. Can I get what it has translated so I can use the parts?

    I would ask in the ExportPDF forum, Adobe ExportPDF (read only) (assuming that's the service to which you have subscribed). This is the Reader one.

  • How to Add attachments at the time of Conversion

    Hi all ,
    Is it possible to get the attachments at the time of conversion .
    we want to attach a URL to the trancation at the time of data conversion .
    Example:
    if we are uploading the MM data and we want to have a URl as an attachment for every material can we add it at the time of conversion?
    thanks
    Naval

    Using GOS ...

  • How to delete design time & configuration time objects permanently

    Hi All,
    how to delete the design time objects & configuration objects permanently, because i have created some objects repeatedly in different scenarios. there was some confliction, that's why i am going to delete the objects. Is it possible, if yes revert back to me asap.
    Thanks & Regards,
    Nag.

    hi,
    Check tis for how to delete IR objects.
    /people/siva.maranani/blog/2005/05/22/how-to-delete-software-component-from-integration-builder
    and to delete it from ID delete it from the OBjects TAb.
    Activate the change list.
    Sachin

  • Question about the Timer Objects

    According to the API docs, the method Schedule for a Timer object takes the following constructor:
    schedule
    public void schedule(TimerTask task,
    Date time)
    Schedules the specified task for execution at the specified time. If the time is in the past, the task is scheduled for immediate execution.
    Parameters:
    task - task to be scheduled.
    time - time at which task is to be executed.
    Source: [link]http://java.sun.com/j2se/1.4.2/docs/api/java/util/TimerTask.html[link]
    However, I am getting the following error:
    The method Schedule(TimerTask, Date) is undefined for the type Timer.
    Any idea why I would be getting this message?

    However, I am getting the following error:
    The method Schedule(TimerTask, Date) is undefined for
    the type Timer.
    Any idea why I would be getting this message?Yeah. Could be 2 things:
    1. It's "schedule" not "Schedule" (case matters)
    2. You're using java.sql.Data instead of java.util.Date.

  • Change the icon displayed beside date/time object?

    Hello,
    does anybody knows if it is possible to change the icon that is displayed beside the date/time object (when you click on it the calendar opens)? My customer stated that it is a bit confusing because it looks like a normal dropdown, not like a calendar.
    Regards, Karin

    Hawker,
    Clarify me whether u want to save this date field to only a single table or two tables.
    Regards,
    Gyan

  • While loop using a timer object

    Hello Technet,
    I have a file that gets created every night by a batch job and I need to send that file every night. So, I came up with a method (if there's a better way, I'd like to hear). I created a 2 hour timer object to run a while loop. While the time elapsed is less
    than 2 hours, the loop will run.  In the loop, I have a if condition to test for a file.  If the file is not there, then sleep for 10 minutes.  If the file is there, then send it to me with send-mailmessage. The problem is, I will get the file
    sent to me at every interval because the loop is terminated by the timer. I would like the loop to terminate once the email message is sent to me.  Here is my code snip. Can someone please help on getting the loop to terminate when the message is sent?
    $file = "c:\file.txt"
    $timeout = new-timespan -hours 2
    $sw = [diagnostics.stopwatch]::StartNew()
    while ($sw.elapsed -lt $timeout)
    if(!(test-path -path "$file1"))
    file is not there...yet
    start-sleep -seconds 600
    else
    $SmtpServer = "relay"
    $To = "my@emailaddr"
    $From = "me@emailaddr"
    $Subj = "Got it"
    $Attm = "$file1"
    $Body = "Please see Attachment"
    Send-MailMessage -smtpserver $SmtpServer -from $From -to $To -subject $Subj -body $Body -attachment $Attm

    Hi,
    You can use break:
    http://ss64.com/ps/break.html
    EDIT: Alternatively, you can try this:
    $filePath = 'c:\file.txt'
    $found = $false
    Do {
    $file = Test-Path -Path $filePath
    If ($file) {
    Send-MailMessage -To [email protected] -From [email protected] -Subject 'Got it' -Body 'Please see Attachment' -Attachments $filePath -SmtpServer smtp.domain.com
    $found = $true
    Else {
    Start-Sleep -Seconds 600
    Until ($found -eq $true)
    This will loop until the file is found instead of relying on a timer.
    Don't retire TechNet! -
    (Don't give up yet - 12,700+ strong and growing)

  • RE: Timer Object

    Since you have not specified what exactly you want to do these are the
    things that I can suggest:
    1. Create a new class for example 'customTimer' with a private attribute
    of type Timer. Write methods to do timer operations on this class. This
    class can be made shared. The Service object can then have an attribute
    of the 'customTimer' class type and do timer operations on it. OR
    2. For an application that we are developing we need certain processes
    to be run by a Service object periodically every few minutes. We start
    an event loop task in the init() method of the Service object. The event
    loop creates a new Timer object before it starts. The event loop traps
    Timer ticks and runs the required processes.
    Hope this helps.
    Sanjay Murthi
    Indus Consultancy Services, Inc.
    From: gbastian
    Sent: Monday, August 11, 1997 1:10 AM
    To: forte-users
    Cc: murthis; thyagarajm; thyagarm; vasasm; chandraa
    Subject: Timer Object
    MCI Mail date/time: Sun Aug 10, 1997 11:54 pm EST
    Source date/time: Mon, 11 Aug 1997 14:18:29 +1000
    Hi All,
    We wish to have a service object running on our server with an attribute
    of
    type TIMER, however in the Forte Framework, TIMER is not set to shared or
    distributed, and we have been unable to override the class, with the
    following errors .....
    "Cannot add superclass framework.time to class test"
    "The class `Framework.Timer' given in an INHERITS FROM list can not
    be
    a superclass for the 4GL class Services.Test"
    If anyone has any resolution for this problem, please email.
    Thanks in advance,
    Greg.

    Hi
    for a particular user we have three ways of authorization check:
    <b>Authorization </b>
    Enter in the user master record or part of an authorization profile. An authorization comprises complete or generic values for the authorization fields in an authorization object. The combination determines the activities with which a user can access certain data.
    Maintenance in transaction SU03 or generation from transaction PFCG (profile generator for role maintenance).
    <b>Authorization Profile </b>
    Grouping of several individual authorizations or further authorization profiles. Can be entered in the user master record instead of individual authorizations. An authorization can be assigned to authorization profiles as often as you wish.
    Maintenance in transaction SU02 or generation from transaction PFCG (profile generator for role maintenance).
    <b>User Master Record </b>
    The existence of a user master record is a prerequisite for logon to an SAP system. The master record determines which actions a user is allowed to execute and which authorizations they are assigned. Default settings, such as the format in which decimal places are displayed in lists, are also stored in the user master record. An authorization profile can be assigned to users as often as you wish.
    Maintenance in transaction SU01.
    Hope this helps
    Regards
    Amit

  • Date Time stamp conversion

    I have a timestamp coming from flat file in the following format YYYY-MM-DD HH:MM:SS.mss(2007-02-21 11:48:31.000)
    to store in Bw I have  created a Object as data type :NUMC and length 14 ,I have conversion routine as times .I was wondering if this will work and also
    can anyone suggest me to covert this as YYYYMMDD and tIme by spliting the field i am getting from flat file.
    Thanks
    Samuel

    Hi Samuel,
    You would need to write a routine for converting.
    Char v_date(8), i_date(18), day(2), month(2), year(2).
    i_date = trans_stru-<your date>.
    day = i_date +  9(2).
    month = i_date + 6(2).
    year = i_date + 5(4).
    concatenate year month day into v_date.
    Result = v_date.
    Bye
    Dinesh
    (Do not forget to assign points!!)

  • Dynamic run-time objects in a query

    Hi everybody,
    I came across some docs that say this Dynamic SQL fails:
    CREATE PROCEDURE drop_table (table_name IN VARCHAR2) AS
    BEGIN
    EXECUTE IMMEDIATE ’DROP TABLE :tab’ USING table_name;
    END;
    Can someone explain why can't an object name be provided through a bind variable?
    And the workaround, according to the docs is:
    CREATE PROCEDURE drop_table (table_name IN VARCHAR2) AS
    BEGIN
    EXECUTE IMMEDIATE ’DROP TABLE ’ || table_name;
    END;
    Can you clarify on this?
    Thanks.
    -- Kishore.

    Kishore:
    It is not really the compilier that has the problem, it is just telling you that your code will not run when you try to execute it. When you use bind variables, as in Case 1, Oracle does not "see" the value of the bind variable until it actually executes the statement (we'll ignore peeking in 9.2). So, if you issue something like:
    SELECT col
    FROM t
    WHERE id = :bvWhen Oracle parses the query, it will check to see that t exists, you can select from it, col exists in t, etc. Then, the optimizer will look at the WHERE clause and say "I've got an equality predicate, is there an index on id? If so, it will most likely choose an index based access plan. At this point, the optimizer has no idea what the value of bv is. Now, it will bind the value passed into the query and executes it.
    This can lead to bad plans if you have skewed data and no histograms what if id has only 2 distinct values 1 row with id 1 and 99,999 with id 2. If you pass 1 for id, then id is the proper access plan. However, if you pass 2 then a full table scan is much more appropriate.
    Now, think about the sequence of events when you try to bind the object name into DDL. What the database will see at run time from the execute immediate statement is:
    DROP TABLE :bv;The same things happen in the parse phase as in the SELECT. Oracle will check whether the table exists, that you have the required permissions to drop it, etc. But, which table does it check? Remember, at this point Oracle does not know what value is in the bind variable.
    In case 2, what the database will see as the sql statement when the procedure executes is:
    DROP TABLE t;Now, at run time, Oracle can do all the required parse time checking and execute the sql statement. The compiler recognizes that the string passed to execute immediate will be at least parsable by the database and allows the compilation to succeed.
    HTH
    John

  • Keynote 6.0 vector smart object conversion to Photoshop CS6

    Hi,
    I upgraded to OS 10.9 and Keynote 6.0. In the previous version of Keynote, I was able to easily paste Keynote content (words, shapes, charts) into Photoshop CS6 & Illustrator CS6 as vector objects, of which the elements could be independently manipulated by releasing the clipping mask.
    However, with Keynote 6.0, it appears the content mentioned above pastes into CS6 software as .tiff files with no option to convert to a vector smart object?  Is there a way to force a vector object placement or does this new Keynote version no allow (and if so why eliminate such a convenient function as vector smart objects)?
    Thanks for the help...

    Hello  thanks for your answers,
    i posted this when i was upset because it was a very frustrating situation. I create Vector art in Illustrator and most of the times i just copy and paste them into Photoshop. I dont use Illustrator Cs6 because some Issues with the color Picker and because i Use Scriptographer alot. So i use Photoshop CS6 and Illustrator CS 5.
    Somehow recently i noticed this strange behaviour. When i close Illustrator completely and doubleclick the Layer in Photoshop it works fine.

  • Mutiple object conversion

    Anyone got good idea to convert mutiple object to mutilpe String ??
    Like 5 object to 5 different string

    objA.toString() + objB.toString() + ...
    It's quite na�ve to think about anything like "conversion" of objects. Such a thing does not exist in Java. toString() creates a new String object representing the instance the method was called on.

  • Automatic time zone conversion in web dynpro

    We have a WDA running on top of a SAP system that is running on US time. The data from the WDA must be stored in SAP using US time. The WDA will however run in England and needs to display English time to the users. Is there any mechanism or concept in web dynpro that provides automatic time conversion when reading from and displaying time and when writing data back to the database? Some kind of  screen exit or other?
    I am not asking how to convert the value of a single field from one time zone to another, I am hoping for some general solution to the problem of time zones in web dynpro.
    Thanks!

    I don't really have anything useful to say, but couldn't help to add my two cents here...
    Whenever you work in a system that supports users or other parties spread among different time zones you start wishing for some better time zone support. It's not just the user's time zone that is relevant, just imagine for example a service call to a call center in India, where probably the customer's time zone is even more important than the user time zone.
    I know that in principle we have some design issue here, because standalone dates (without any time details) are impossible to convert among different time zones. It would be nice though if the system would provide a framework where any date/time fields can be registered and linked to some time zone field. Changing the time zone field, would automatically update all registered date/time fields.
    Ideally the field for choosing time zones would have the ability to show a list of preferred time zones with (changeable) explanations. One could for example imagine that by default it's populated with the two entries for user time zone and system time zone. Each application should be able to register additional time zones, e.g. sold-to time zone for an order, etc.
    Another (workaround) option I used in applications (for automatically filled read-only fields, like creation date/time) is to settle on one reasonable default time zone (e.g. user) and then have tool tips showing dates/times in other relevant time zones.
    Anyhow, lots of half-baked gibberish, essentially I just wanted to say that it would be nice to have some better time zone support, so I'm voting for that as well (good point Chris). And ideally this would not be limited to web dynpro. I'm sure some smart person should be able to come up with something nice...
    Cheers, harald

  • Cannot Place Quick Time Object Controller in Power Point

    I get a Visual Basic Error message that reads "Object library not registered" when I try to place a QuickTime object on a Power Point slide. Can anybody help me figure out how this can be done? I need to embed a Quick Time movie into a Powerpoint presentation (without having to link to it) It can be done with Flash and Real video, but for some reason I cannot get it to work with QuickTime. Does anyone have any experience with this? Do I need to buy QuickTime Pro in order for it to work?
    Thanks,
    Greg

    You could look to use Presenter to create quiz question slides in the PPT deck, and then the Mobile viewers should see them and be able to interact (I think).
    The issue with the SWF file is Apple considers that SWF to be a real-time change to the code of the room, and disables it as that is against their policy for apps. So I'm not sure that there is anything you can do differently to your SWF to make it work. Have you tested loading the SWF directly into a share pod, without the PPT? Not sure that that would result in anything different, but worth a try.

  • Question about implementing a clock using a Timer object

    Hello all, I'm not sure if this is the correct forum to post this question but I think so, as it regards a Swing component. I want to add a timer (a clock that starts at 0:00 and keeps track of how long the app is running) to a frame. I am just curious if using a Timer is the proper way to keep track of time, and just repaint() the clock object every second? (or more frequently if desired)... or is there a better way to do this? Thanks in advance for any comments/feedback/help!
    Brian

    Hello,
    Timer is not accurate. You can use Timer to display your component repeteadly, and System.currentTimeMillis() at each call to deduce the elapsed time.

Maybe you are looking for

  • Style Mapping for TOC & Drop-down

    I'm using RoboHelp 8 and MS Word 2007. I've modified the Style Mapping.dot Word template in the project folder (as opposed to the generic one in the RoboHelp installation folder). I've done the mapping in the Printed Document Appearance dialog box. T

  • Multiple records in MessageInOutEvents table

    I have enabled tracking the message body in my receive port before the file is processed but I get two entries available in the [dta_MessageInOutEvents] table due to which the BTS.MessageId is returning the message id of the second entry for which no

  • Print preview for cheque print

    hi experts,                How to see the print preveiw for f-58 tcode.

  • Change site name

    i've published my iWeb site to a folder on my desktop. Not to the web yet. Because for some strange reason, each time i publish (save) my site to a folder, the folder name always has an underscore at the end. I did NOT put an underscore at the end of

  • Elderly relative has problems with facetime

    Hello. I have an elderly uncle who uses facetime to stay in touch with me, (as we live in different countries). Whenever he calls me now, all I can hear is a horrible crackling/static noise. He can hear me but I cannot hear him. Please help. Thank yo