Converting from the windows date format

Folks,
I have no doubt this has been answered before somewhere in deep dark recesses of these forums, but I'm having trouble finding a solution...
I have a csv file that contains a date and time field that has been stored in what I gather is a Microsoft format whereby the date and time are represented as a flaoting point number. The data can look something like 38410.25 which turns out to be 27/02/2005 06:00:00. Anyone been through this movie before?
Thanks,
overcanyon.

Peter,
From snippets I've seen about the place, the microsfot calendar started in 1 jan 1900. I'm not even gonna think about the timezone but there is leap years an' stuff to think about and I'm feeling lazy in a kinda 'this code must be done before sorta way'.
You're making me feel guilty now. Like maybe there's not as much to it as I think.
Nah, thinking about leap years is makin' my brain ache. Yeah, Y2K flashbacks comin' on...
Any takers on where a ready made class might be living? :)
overcanyon

Similar Messages

  • How can I convert from Modbus raw data to engineering units using a formula?

    Within Lookout, I have several Modbus numerical input types that do not have a linear corespondence to the Engineering values they represent.  How can I display these values accurately using a formula to convert from the raw data to an engineering value?

    I don't quite understand your reply.  I'm using Lookout 6.0.2, logged in as Administrator, in Edit Mode.  The Modbus object is named RTU06_SAV.  The Active member is 30002 with an alias of SAVfmSMT_RSL.
    Following your instructions, I opened Object Explorer and right-clicked on RTU06_SAV. 
    This opened a menu containing:  Refresh, Cut, Copy, Rename, Delete, Edit connections..., Edit Data Member Configuration, Configure Network Security and Properties.
    I assumed that I should select Edit Data Member Configuration, but maybe I'm wrong. 
    Within Data Member Configuration I can set up Linear Scaling between Raw data and Engineering data.  I know how to do that, but what I need to know is how to convert Raw data to Engineering data using a formula representing a non-linear transformation (such as a converion to a logarithmic value or perhaps a formula derived by fitting the formula to a curve on a calibration chart).
    Once I have this my Engineering data can be represented on a control panel as both a numeric value AND as a correctly reading Gauge.  It can also be properly represented on a HyperTrend graph.
    What do you suggest?

  • How Do i create a list that will show in a dropdown box with the list being pulled from another tab and not the cell data format junk?

    How Do i create a list that will show in a dropdown box with the list being pulled from another tab and not the cell data format junk?
    I currently run OS X 10.10.1
    Now i have been trying to work on this for a while now and what i want to do should be simple but its apparently not.
    Here is an example of what i want to happen.
    I will have 2 tabs: Contact | Sales
    Now Contacts will have the list of names and various information about a customer, While Sales will have one drop-down box for each Cell Row that will show the names of the person in tab contacts
    for what i am wanting to do i cant use the data format pop-up menu because the list is edited everyday several times a day.
    Now how do i do this, Excel can do this so how can numbers do it?

    Hi Shegra,
    Paste this into a applescript editor window and run it from there. In the script you may need to adjust the four properties to agree with your spreadsheet. Let me know if you have any questions.
    quinn
    Script starts:
    -- This script converts column A in one table into an alphabetized list of popups. It copies the last cell in that column. Then reverts the column to text. It then refreshes popups in column A of a data table starting with a user defined row.
    property DataEntrySheet : "Sheet 1" --name of sheet with popups to be refreshed
    property DataEntryTable : "Sales" --name of table with popups to be refreshed
    set copyRange to {}
    property PopValueSheet : "Sheet 1" --name of sheet with popup values table
    property PopValueTable : "Contacts" --name of table with popup values
    set PopStartRow to {}
    tell application "Numbers"
      set d to front document
      set ps to d's sheet PopValueSheet
      set pt to ps's table PopValueTable
      set s to d's sheet DataEntrySheet
      set t to s's table DataEntryTable
      set tf to t's filtered --this records filter setting on data Entry Table
      display dialog "Start from row #..." default answer "" with icon 1 -- with icon file "Path:to:my.icon.icns" --a Week # row
      set PopStartRow to {text returned of result}
      tell pt --convert list to alphabetized popups
      set ptRows to count rows
      set copyRange to ("A2:" & name of cell ptRows of column "A")
      set selection range to range copyRange
      set selection range's format to text
      sort by column 1 direction ascending
      set selection range's format to pop up menu
      -- popupsmade
      set selection range to cell ptRows of column 1 of pt
      set v to value of cell ptRows of pt
      end tell
      activate application "Numbers"
      tell application "System Events" to keystroke "c" using command down
      tell pt
      set selection range to range copyRange
      set selection range's format to text
      end tell
      tell t
      set filtered to false
      set tRows to count rows
      set pasteRange to ((name of cell PopStartRow of column "A") & ":" & (name of cell tRows of column "A"))
      set selection range to range pasteRange
      tell application "System Events" to keystroke "v" using command down
      set filtered to tf
      end tell
    end tell

  • Convert the current date format.

    Hi All,
    I am working on database 11g. My nls_data_format is 'DD/MM/YYYY'.
    SQL> SELECT SYSDATE FROM DUAL;
    SYSDATE
    21-04-2009
    I would like to get the data format as 'MM/DD/YYYY'. I am using the to_date function but getting the error.
    SELECT TO_DATE(SYSDATE,'MM-DD-YYYY') FROM DUAL; Also after adding the to_char I am not getting the correct data format. Could any one suggest how I can get the data in correct format.? Also I changed the nls_date_format, still getting the same date formt.
    Thanks
    SUN

    User SUN@ wrote:
    Thank you for your replay.
    I want in date mode, not in charector, because after that I am doing calculation on these dates.
    Thanks
    SUNSo, don't worry about the format!
    If you've got a date that's in DATE format, you don't need to worry about what that format is; it's purely internal to Oracle. Since we're not an Oracle database, any time we refer to a date, we do so as a string (eg. 20th April 2009, 20/04/2009, etc). Any time Oracle outputs a date to us, it must convert the date into a string so us humans can understand it - it does this either through the explicit to_char() function that we specify or implicitly according to the nls_date_format parameter.
    So, you only need to worry about formatting dates:
    a) when you convert a date-as-a-string to Oracle's DATE format (eg. to_date('01/01/2009', 'dd/mm/yyyy') )
    b) when you're displaying a date (eg. to_char(sysdate, 'dd/mm/yyyy') )
    If you're manipulating dates, you can leave them in the same format: eg, sysdate + 2, add_months(your_date_col, 3), trunc(your_date_col), etc

  • Convert the date of string to datetime format 'MM/dd/yyyy' when the system date format is 'dd/MM/yyyy'.

    I need convert the date of string format 'MM/dd/yyyy' to datetime format 'MM/dd/yyyy' when the system date format is 'dd/MM/yyyy'.Since
    I need to search values based on date where my database datetime  is 'MM/dd/yyyy' format.

    In my opinion you should re-consider the assumption that the date picker returns a string. Maybe it is able to return a
    DateTime object directly instead of string. Then you will pass this value as a parameter of SQL query. This should work regardless of computer configuration.
    Otherwise, follow the previous string-based approaches.

  • I did this -- Windows 7 and Vista 1. Select the Start Menu in the Windows Taskbar. 2. In the Search box, enter the following: %APPDATA% 3. Press Enter. 4. From the Application Data folder, navigate to Local\VirtualStore\Program Files\Mozilla Firefox. 5. D

    When I sign out of FF and want to go back in, I have to go through Task Mgr each time by deleting FF and then signing back in. I followed these directions -- Select the Start Menu in the Windows Taskbar. 2. In the Search box, enter the following: %APPDATA% 3. Press Enter. 4. From the Application Data folder, navigate to Local\VirtualStore\Program Files\Mozilla Firefox. 5. Delete the file xpicleanup.dat. 6. Restart Firefox. --- but I could not find Mozilla Firefox under 'Program Files'.
    == This happened ==
    Every time Firefox opened
    == about a week ago

    Where did you find those instructions to delete the '''xpicleanup.dat''' file?

  • Cannot convert from java.util.Date to java.sql.Date

    In the below code am trying to get the current date and 60 days prior date:
    Date  todayDate;
              Date  Sixtydaysprior;
              String DATE_FORMAT = "MM/dd/yy";
              DateFormat sdf = new SimpleDateFormat(DATE_FORMAT);
             Calendar cal = Calendar.getInstance();
              todayDate = sdf.parse(sdf.format(cal.getTime()));
              cal.add(Calendar.DATE, -60);
             Sixtydaysprior = sdf.parse(sdf.format(cal.getTime()));I have imported following files:
    <%@page
         import="java.util.Calendar,
                   java.text.SimpleDateFormat,
                   java.text.ParseException,
                            java.util.*"
    %>Shows up following error msg:
    Type mismatch: cannot convert from java.util.Date to java.sql.Date
    Thanks.
    Edited by: MiltonDetroja on May 22, 2009 11:03 AM

    Shows up following error msg:
    Type mismatch: cannot convert from java.util.Date to java.sql.Date
    I don't think this exception is thrown from the portion of code you have shown. As clearly specified in exception message, you cannot cast an instance of java.util.Date to java.sql.Date. you will need to do something like this
    java.util.Date today = new java.util.Date();
    long t = today.getTime();
    java.sql.Date dt = new java.sql.Date(t);

  • If I want to keep the quality of the original captured footage(from the tapes),what format should I?

    I captured canon hv20 by firewire to my computer with adobe premiere elements 11. After capture, I have cutted clip three times. Then I want to export my computer because of I watch on my 46 inches full hd lcd television. If I want to keep the quality of the original captured footage (from the tapes), what format should I? I choosen mpeg 1440x1080i 24, it alerts error. Or i chosee avchd 1920x1080p, then it is too larger than captured scenes. I think it is 20000MB but captured scened (without cut) only 11.2 gb. Please help me. Thanks very much.

    YCLCS
    File size and Bitrate and Quality are interrelated. From what I have read, the bitrate for your HDV footage from the PAL Canon HV20 camcorder should be about 25 Mbps (megabits per second). If you did a HDV data capture firewire into Premiere Elements, you should MPEG2.mpg file on the Timeline.
    When you did your export
    Publish+Share
    Computer
    MPEG
    using Presets = MPEG2 1440 x 1080i25, did you make any changes in the settings under the Advanced Button/Video Tab of the preset?
    When you look at the settings in the Export Settings dialog for the MPEG 1440 x 1080i25 preset, you will see the default bitrate settings
    Minimum = 18 Mbps
    Target = 25 Mbps
    Maximum = 30 Mbps
    The program's export bitrate may be higher than that of your source media, resulting in the increased file size. You can check out the bitrate, using the properties readout from a free program such a MediaInfo
    http://mediainfo.sourceforge.net/en
    You could experiment with different bitrate, trying to maintain the quality as you decrease the maximum bitrate from 30 Mbps downward to reduce the file size.
    The file extension of your export should be .m2t, .mpg. So, your export is MPEG2.m2t. I find that that type of file will playback in Windows Media Player, but not QuickTime (latest version). This particular export would be the closest to the source media properties.
    But, right now I would try to perfect the MPEG2 1440 x 1080i25, experimenting with the bitrate to bring the file size into line with the source file and still maintain video quality. The AVCHD.mp4 suggested by Ann Bens is a prime candidate quality wise. If size becomes a factor, you might want to explore a 1920 x 1080i25 or 1440 x 1080i25 Windows Media Video 9.wmv file which we can discuss in more detail depending on how things are going.
    Please review the above and then let us know how we can help.
    Thanks.
    ATR

  • How to customize the cell date format

    Trying out the trial version of Numbers....
    I would like to customize the cell date format. The inspector gives you several choices for date formats but I would like something different and wish to customize my own - just like in Excel.
    I don't see a way to do this. Are we limited to only those date formats provided by Numbers?
    Is there some other way to do this?

    I found a way to do this, but not in Numbers. Note that it is probably not for those who are squeamish about editing configuration files, and could probably break something if done incorrectly:
    1. Right click on the Numbers application icon and choose "Show Package Contents".
    2. Type "date" into the spotlight window and click on the DateTimeFormats folder or drill down to Contents/Frameworks/SFUtility.framework/Versions/A/Resources/DateTimeFormats.
    3. Right click on en_US.plist or your language's plist file and click Duplicate to make a backup. (Just rename the backup if you damage something).
    4. Open en_US.plist or your language's plist file with a property list editor. I use Property List Editor from the Apple Developer Tools, but I think Pref Setter is also easy to use.
    5. Open AcceptedDateFormats and check if your desired format is there. If not, add a string key with the desired format.
    6. Open DisplayedDateFormats and add a string key in the format you want it displayed.
    7. Save the plist file.
    8. Restart Numbers.
    9. Your desired date format should appear in the list of formatting choices.
    If you're opening up plist files and editing them, I'm hoping the date format conventions are familiar. If not, cross reference them to the list of already coded date formats in the date format inspector to get the hang of it.

  • Difference between AAC and m4a files, converting from AAC to useable format

    Does anyone know the difference between AAC and m4a files? iTunes has an option to use an AAC encoder to compress CD files, but this creates an m4a file not an AAC file. I just got some actual AAC files and iTunes cannot read these, is there a way to convert from AAC to a format that iTunes recognizes? Thanks

    iTunes uses AAC data wrapped in an MPEG 4 container file. If you got some *.AAC files, and they're just raw AAC files, then you need to wrap them in an MPEG 4 container. The only way I know to do this is using the foobar 2000 program. You can find more information at http://www.hydrogenaudio.org and http://www.foobar2000.org

  • How to update the default date format in OBIEE 11G.

    Hi All,
    How to change the default date format in OBIEE 11g from the MM/DD to DD/MM. Could anyone please help me out ASAP?
    Thanks,
    Arpan

    Hi Arpan
    OBIEE 11g is having " localedefinitions.xml " file at this Location C:\Oracle\Middleware\Oracle_BI1\bifoundation\web\display
    in my case i installed at C:\Oracle\MIddleware.
    so
    1- Stop BI Server from EM
    2- Navigate to this Location C:\Oracle\Middleware\Oracle_BI1\bifoundation\web\display. in your case oracle home will be different
    3- take a backup of this file localedefinitions.xml "
    4- modify it and save
    5- bring BI Server up.
    Regards
    sher

  • CS6 has been converted from the upgrade I bought to a trial version.  What the heck is going on.

    I upgraded from CS5 to CS6 for my IMac.  I downloaded CS6 and out in my serial number and it worked fine for a number of weeks.  Suddenly when I went to use it it said it was a trial version.  I had to register it to use my CS6   I registered it and it worked,  but only as a Trial Version of CS6 Extended. I do not want CS6 Extended.  I deleted the trial version of CS6 Extended from my hard drive and once again downloaded my upgrade of CS6 and put in my serial number and it worked fine for a couple of weeks. Today, once again, it tells me it is a trial version and will not load unless I register the trial version. What the heck is going on? This is crazy.  I simply want to use CS6, for which I paid. Help!
    Frank Brault

    Thanks!
    Date: Sun, 30 Dec 2012 12:49:52 -0700
    From: [email protected]
    To: [email protected]
    Subject: CS6 has been converted from the upgrade I bought to a trial version.  What the heck is going on.
        Re: CS6 has been converted from the upgrade I bought to a trial version.  What the heck is going on.
        created by Dragoro21 in Photoshop for Beginners - View the full discussion
    Its a bug that came with the latest update. The developers know about it and will fix it as soon as they get back from christmas vacation. Lots of us (inluding some of the developers) are suffering the same problem.
         Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at http://forums.adobe.com/message/4957602#4957602
         Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/4957602#4957602
         To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/4957602#4957602. In the Actions box on the right, click the Stop Email Notifications link.
         Start a new discussion in Photoshop for Beginners by email or at Adobe Community
      For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

  • The specified data format is not available when I paste

    When I try to copy a jpg image from Firefox21 and try to paste into a graphic software program,
    I get a message:
    "the specified date format is not available"
    It works ok with text,
    It also works fine in IE8, which I prefer not to use anymore.
    I use WinXP Pro 3
    any ideas???

    I assume you are using right-click > Copy Image ?
    Does this problem occur with all images or is it limited to particular sites?
    If you try Save Image As instead, and then open the image, is it a valid image file?

  • Date Format in Zreport similar to the default date format set using su01.

    Dear All,
                I have a requirement as to change the date format in Zreport as the one which is set in default date format for the user in Su01 tcode.
    Ex.. If the user has set the default date format in SU01 as ' YYYY-MM-DD' , in report also, date should appear as '2009-12-24'.
    Is there any code  or  Function Module to change the date format in report as in the default Date format?
    Can u help me in this?
    Bye.....
    Cheers
    Christina.

    Try the following code.
    select the format of current user from usr01 table.
        SELECT SINGLE datfm FROM usr01
        INTO w_datfm
        WHERE bname = sy-uname.
    Format based upon the current user settings. put this total code inside one form for reusability.
        IF w_datfm = '1'.
          CONCATENATE w_date6(2) c_dot w_date4(2) c_dot w_date+0(4) INTO outtab-value.
          CONDENSE outtab-value NO-GAPS.
          CONCATENATE w_rundate6(4) w_rundate3(2) w_rundate+0(2) INTO w_date.
          CONDENSE w_date NO-GAPS.
        ELSEIF w_datfm = '2'.
          CONCATENATE w_date4(2) '/' w_date6(2) '/' w_date+0(4) INTO outtab-value.
          CONDENSE outtab-value NO-GAPS.
          CONCATENATE w_rundate6(4) w_rundate0(2) w_rundate+3(2) INTO w_date.
          CONDENSE w_date.
        ELSEIF w_datfm = '3'.
          CONCATENATE w_date4(2) '-' w_date6(2) '-' w_date+0(4) INTO outtab-value.
          CONDENSE outtab-value NO-GAPS.
          CONCATENATE w_rundate6(4) w_rundate0(2) w_rundate+3(2) INTO w_date.
          CONDENSE w_date.
        ELSEIF w_datfm = '4'.
          CONCATENATE w_date0(4) '-' w_date4(2) '-' w_date+6(2) INTO outtab-value.
          CONDENSE outtab-value NO-GAPS.
          CONCATENATE w_rundate0(4) w_rundate5(2) w_rundate+8(2) INTO w_date.
          CONDENSE w_date NO-GAPS.
        ELSEIF w_datfm = '5'.
          CONCATENATE w_date0(4) '/' w_date4(2) '/' w_date+6(2) INTO outtab-value.
          CONDENSE outtab-value NO-GAPS.
          CONCATENATE w_rundate0(4) w_rundate5(2) w_rundate+8(2) INTO w_date.
          CONDENSE w_date NO-GAPS.
        ENDIF.

  • Why does the Canadian regional date format default to the US date format?

    I've discovered that on the iPad, iPhone and MacBook that choosing the Canadian Regional format results in the US date format of mm/dd/yyyy rather than the Canadian format of dd/mm/yyyy. I can use a custom format on the MacBook (but why do I need to??) but can't see how to change under settings on my iPad and iPhone.
    -Bob.

    In iOS8 anyone can now select the "Canadian English" regional setting and you will get dates in correct ISO 8601 YYYY-MM-DD format.  To confirm this is what you should use, check your Ontario Drivers License, OHIP health card or the bottom date on any federal gc.ca  webpage.  Yosemite is also the same. Thanks Apple, for having listened to Canada!
    (You might want to change Siri back to the American female voice from the British-sounding male voice.)

Maybe you are looking for

  • Po creation from many pr

    Hi all In our project we are creating mulitalbe pr  through network activity for same material, i had checked One collective purchase requisition per order , still system is creating many pr we need to create only one po for all the pr please explain

  • Dual boot on K410 window 8 with window XP pro

    Recently I had purchased K410-i7 window 8 x64 and want to make dual boot with window XP 64 pro. Would you please teach me how to do or if someone can do for me, I can pay service? I live in Cupertino, CA.   Thanks in advance.

  • RV110w VLans

    Hi, I'm looking to update our office network and replace our old wireless box. I've been looking at the RV110w after a google search and need to find out some things before suggesting anything. Currently our network is running a public IP address for

  • Erasing programs/info/etc

    I'm kind of stuck in a situation here. I'm selling my iMac (purchasing a macbook pro soon) but the problem is, I don't have the original disc to clear my hard drive or reset the system back to default settings. Is there a way to do this without the d

  • How do i combine two photos i have in iPhoto together?

    i want to put writing from one cropped image under a logo of another...how?