How to judge if one string is  date or  time

hi everyone,
how to get to check if one string means date or time? Any sugestion is appreciated.
Julian

Hi julian ,
just give the example for a string how u are storing the formats for date and time in ur system ,
i mean what is the length of the date field and time field in ur text format
will it be same ,,if so give us a value (or a set of values )to work on a specific logic
cause system takes 8 chars for date field and 6 chars for time field ,,
also ur requirement is asking for a date or time check on a specific string ,
but i cant put the same string for two fields check ...
if that is the scenario y dont u put
field string
DXXXXXX,
TXXXXXX,
DXXXXXX,
DXXXXXX,
TXXXXXX,
this way ..
differentiate with a tag
field string+0(1) = 'D', --->DATE FIELD
ELSE                         TIME FIELD.
regards,
vijay
data date type d value '20061014'.
DATA TIME TYPE T VALUE '154633'.
WRITE (8) TIME USING EDIT MASK '__:__:__'.  "Output: 15:46:33
write (10) date using edit mask '__/__/____'.
write  time using edit mask '______'.
*my logic is system uses internally 8 chars for date field and 6 chars
*for time field

Similar Messages

  • How do i insert one string to more then one textField?

    how do i insert one string to more then one textField?

    var myString = "My String";
    myTextField1.text = myString;
    myTextField2.text = myString;
    myTextField3.text = myString;
    myTextField4.text = myString;
    // etc...

  • How can I get rid of the dates and time on my Notes

    How do I get rid of the dates and times on my Notes that appeared when I updated to 8?

    Yes, it's seems like a poor design decision.
    By putting the date on the line below the Note title in the Notes Index, the app shows half the number of notes per page AND if you have a large number of notes, it takes twice as long to stroll down.
    I doubt the designer actually uses the app. 
    TSAW

  • How to restore iMac to an earlier date through time machine?

    how to restore iMac to an earlier date through time machine?

    http://support.apple.com/kb/ht1427
    Especially the section "Restoring Data from Time Machine Backups" and within this, the sub-section "Restoring your entire system from a backup"

  • If I add artwork by dragging a jpg to the artwork area after selecting several rows, in some instances a single icon is created in the flipper;  in others one is created for each song. Why? How can I get one image per album every time?

    If I add artwork by dragging a jpg to the artwork area after selecting several rows, in some instances a single icon is created in the flipper;  in others one is created for each song. Why? How can I get one image per album every time?

    If I add artwork by dragging a jpg to the artwork area after selecting several rows, in some instances a single icon is created in the flipper;  in others one is created for each song. Why? How can I get one image per album every time?

  • How can we update the last synchronization date and time..on SUP in sccm 2012 R2

    Hi,
        Can you any one please guide me how can i update the last  synchronization date & time in SUP on SCCM2012 r2 , some how its updated as future date and when ever i try to synch the SUP with disconnected WSUS its shows in the wsyncmgr.log 
    "Wakeup for a polling cycle " and  " Wakeupby inbox drop" and "Wakeup by SCF change"  
    Thanks 
    Balaji K

    You'll probably have to call CSS on this one as this not normal by any means. The messages you noted above are completely normal but if that's all you are seeing then there's an issue.
    Have you reviewed wcm.log and wsusctrl.log?
    Jason | http://blog.configmgrftw.com | @jasonsandys

  • As I open my computer, there's a notification telling me to allow these files for a connection, which are very unsual for my mac. I allowed one and my date and time reset to january 1 of 2001. It caused my internet connection to stop working properly.

    Please help me figure out what causes my internet connection and airport extreme run erratically.  It occurred twice already and my only solution is to reset the date and time, and restart my macbook pro. after that, everything seems to work perfectly again. This is only problem that my macbook pro encountered for two years. Thanks!

    Try what Terence Devlin posted in this topic:
    Terence Devlin
    Apr 14, 2015 11:21 AM
    Re: Is Iphoto gone ? i want it back!
    in response to Johannes666
    Recommended
    Go to the App Store and check out the Purchases List. If iPhoto is there then it will be v9.6.1
    If it is there, then drag your existing iPhoto app (not the library, just the app) to the trash
    Install the App from the App Store.
    Sometimes iPhoto is not visible on the Purchases List. it may be hidden. See this article for details on how to unhide it.
    http://support.apple.com/kb/HT4928
    One question often asked: Will I lose my Photos if I reinstall?
    iPhoto the application and the iPhoto Library are two different parts of the iPhoto programme. So, reinstalling the app should not affect the Library. BUT you should always have a back up before doing this kind of work. Always.

  • How to use "Days to keep historical data" & "Maximum time between logs(hh:mm:ss)

    Iam using LabVIEW DSC. Values are being logged continously into citadel.
    Is it possible to retain data of just one month and delete the earlier data as fresh data is being logged into citadel?
    Is it possible to achieve this feature with "Days to keep historical data" & "Maximum time between logs(hh:mm:ss)" options in the history menu of Tag configuration editor ?

    Yes, Days to keep historical data does what you are looking for. After the specified number of days, the old data gets overwritten with new data. So, you always have only the specified number of days' of data in Citadel.
    Note: You may sometimes see that old data doesn't get overwritten till after a day or so of your setting (depending on how much data is being logged). This is because Citadel logs in "pages" and waits till the current page it's logging to is full before it starts overwriting the old ones.
    You do not have to use the 'Max time between logs' option for this. This option forces Citadel to log data every so-many hh:mm:ss regardless of whether or not the data has changed. Note that this is NOT a way to "log data on
    demand". Because, this periodic logging of data would change for a particular tag when its data changes. So, even with this setting all data may not get logged at one shot. Anyways, as I said, you do not have to use this setting for what you're trying to do.
    Regards,
    Khalid

  • How do I delete duplicate songs? (date and time stamp are identical

    I put my cd collection in itunes and now have duplicates of most songs (don't know how I did that). The duplicates have the exact same date and time, so the method to delete a "newer" duplicate will not work. Is there a simple way to delete exact duplicates from the itune library?

    This application can help.  It's US$15.  http://dougscripts.com/apps/dupinapp.php

  • How can I scroll one full page at a time using the mouse wheel?

    I've had this problem for 3 years now. When I nudge my scroll wheel (IntelliMouse Optical) one notch forward or back, Safari moves 1/4 of a page up or down. How can I get one nudge of the scroll wheel to move one full page up or down? Firefox has an add-on, SmoothWheel, that can be set to a full page. Are there any options for doing this in Safari, without having to go to the keyboard? I tried Smart Wheel, no setting for that.
    Any ideas? thanks
    p.s. Please don't tell me to get another mouse, I've tried dozens of them and the old IntelliMouse Optical is the best one for me. (I'm also stuck on an ancient Apple M2980 keyboard. I love those old keyboards.)
    Mac Pro 2X-Quad-Core Intel Xeon 2.8 GHz  MA970LL/A
      OS X 10.8.3
      Memory: 10 GB
      ATI Radeon HD 2600 XT
    Safari 6.03

    I can't use the keyboard to scroll. I need to keep my hand on the mouse, otherwise I'd never get anything done. Since I have no problem getting Firefox to scroll one page at a time, and I'm constantly jumping between 3 browsers, it would be nice to be able to scroll a full page at a time in Safari, just like I can in Firefox. Thanks.

  • How to open only one web page at a time?

    I used to have it set so when I opened a new web page, the previous one closed. Now, nothing closes automatically and I have about 50 pages open that I have to close. How do I set it so that only one page opens at a time?

    HI Janice,
    You can use a keyboard shortcut to close all windows in Safari. CommandShiftW.
    To close one window, Command + W.
    Carolyn

  • Problem in converting the String to Date with time zone GMT

    Hi,
    When I tried to convert the string 12/05/2009 to Date, the time zone is set to BST.On the other hand, for the date 12/12/2009, the time zone is set to GMT. What should I do to get the time zone as GMT all the time.?
    SimpleDateFormat formatter = new SimpleDateFormat("dd/MM/yyyy");
    String dateString = "12/05/2009";
    System.out.println(myDate.toString());

    I think you are all missing the point. java.util.Date objects always alway always store the date as the number of milliseconds since 1/1/1970 UTC so the only TimeZone they have its the implicit UTC. When you use the Date.toString() method the toString() method gets the default time zone from your environment and formats the data accordingly. This means that the same Date object will, by default, produce a different result for France and Australia and the US.
    So, if you have the date "12/5/2009" as a String then to convert it to a java.util.Date you must specify what TimeZone is implied. If it is your system time zone then you can just create a SimpleDateFormat object with the correct format and then use the parse() method to create the java.util.Date object and this will automatically be converted to UTC. If the date String represents some other time zone then you must explicitly set the time zone of the SimpleDateFormat object before parsing the string.
    The same approach applies when converting a java.util.Date object to a String. If you want anything other than your system time zone then you must explicitly tell the SimpleDateFormat what time zone you want the result formatted for.

  • How to present datetime objects as separate date and time objects?

    Hello,
    I store the working times of employees as records containing two datetime fields:
    - begin: datetime
    - end: datetime
    I would like to keep this design, because a working time may cover several days, e. g. beginning at 2015-04-14 22:00 until 2015-04-15 07:00.
    However, in a simplified user interface, I would like to let the user edit his working times using a date field and two time fields:
    - date: date
    - begin: time
    - end: time
    As a first approach, I created a form in a datasheet view, with the following fields:
    - txt_date: the date (unbound)
    - txt_begin: the begin time (unbound)
    - txt_end: the end time (unbound)
    - begin: the real database field 'begin' (datetime, bound, hidden)
    - end: the real database field 'end' (datetime, bound, hidden)
    When the user edits the fields txt_date, txt_begin and txt_end, I catch the AfterUpdate event and then update the database fields begin and end.
    This seemed to work at the first sight. However, then I noticed that changes to the database bound fields affect all rows of the datasheet view. So this is not a suitable solution yet.
    Is there any trick to get this to work? I also have other use cases where I want to modify fields in a datasheet view...
    Thanks
    Magnus

    You need to assign values to the bound controls in each of the unbound controls' AfterUpdate event procedures, as follows:
    Private Sub txt_Date_AfterUpdate()
        Me.Begin = CDate(Nz(Me.txt_Date)) + CDate(Nz(Me.txt_Begin))
        Me.End = CDate(Nz(Me.txt_Date)) + CDate(Nz(Me.txt_End))
    End Sub
    Private Sub txt_Begin_AfterUpdate()
        Me.Begin = CDate(Nz(Me.txt_Date)) + CDate(Nz(Me.txt_Begin))
    End Sub
    Private Sub txt_End_AfterUpdate()
        Me.End = CDate(Nz(Me.txt_Date)) + CDate(Nz(Me.txt_End))
    End Sub
    This assumes that no shift spans midnight of course.  For an example of how to handle shifts spanning midnight take a look at Timesheet.zip in my public databases folder at:
    https://onedrive.live.com/?cid=44CC60D7FEA42912&id=44CC60D7FEA42912!169
    If you have difficulty opening the link copy its text (NB, not the link location) and paste it into your browser's address bar.
    This little demo file includes functions which handle values entered as times where a shift might span midnight, assuming that a shift will always be less than 24 hours duration.  
    Ken Sheridan, Stafford, England

  • How to rename a flat file concatenating date and time the file name?

    I created a package where I run a first interface that uses a flat file from a server and load into a table in Teradata.
    After using the API OdiFtpPut, I used an FTP file and send to an outfit.
    Since this procedure will operate daily, I need at the time of FTP, get the concatenation destination file name, date and time of execution.
    What is the best practice for this?

    Using OdiFtpPut in the field where it informs the destination file name, instead of putting just the file name (lpn_pln.csv), I put as follows:
    - lp_pln_+<% = odiRef.getSysDate (ddMMyyyyhhmm ")%>+. csv
    For code example, today would record the name lp_pln310120111412.csv
    Anything you can add my msn ---> aluizs @ ig. com. br (no spaces)
    Edited by: andre_l_soares on 31/01/2011 08:16

  • How to find the shipping point creation Date and time

    Hi All,
      Could you please help to solve this issue.
       Some of the users created shipping point, Now I have to find out in which date and time the shipping points were created, is there any table to find. please help me.
    Regards,
    Muralikrishna

    hi Murali,
    first define and assign shipping point in enterprise sructure in define shipping point EC07 and assign in OVXC
    goto OVL2 and assign the shipping points
    The following are used for the shipping point determination:
    1. Shipping conditions - Proposed from CMR. The entry in VOV8 for the sales document type if there overwrites the entry in the shipping conditions mainatined in the CMR.
    2. Loading group - Proposed from the material master record.
    3. Plant - proposed from CMIR - if not found then CMR - if not found then MMR.
    But you should first define and assign the shipping point in the "enterprise structure" otherwise you will not be able to do the shipping point determination.
    IMG - logistics execution - shipping - basic shipping functions - shipping point & goods receiving point determination - assign shipping points.
    Shipping point definition:
    IMG - enterprise structure - definition - logistics execution - define, copy, delete, check shipping point. You have to define the shipping point here for the particular plant.
    Shipping point assignment:
    IMG - enterprise structure - assignment - logistics execution - assign shipping point to plant. Here select your plant and assign the shipping point to the same.
    hope this helps,
    cheers,
    Hema.

Maybe you are looking for