Type of object from a database date/time column

Hello everyone,
I've got a concern regarding the way in which coldfusion is
treating date/time columns in a database.
In my opinion when I select a column that is let's say
timestamp type - the object in a query is CF's date/time object.
I've checked the query by getMetaData() and it looks like each
column has its own database type (eq. varchar2, date, etc).
My concern comes from a fact that I've heard that Coldfusion
is treating the date-time columns in a database as strings and in
each case it parses them. So the difference in a locale between a
database server and a Coldfusion server may result in a wrong
date/time object.
Example:
Locale of database EU: yyyy/mm/dd
Locale of Coldfusion US: yyyy/dd/mm
The date like 1st of February 2007 stored in a database would
look then in Coldfusion like: 2nd of January 2007
Could someone please confirm which version is valid?

Johnny852 wrote:
> In my opinion when I select a column that is let's say
timestamp type - the
> object in a query is CF's date/time object. I've checked
the query by
> getMetaData() and it looks like each column has its own
database type (eq.
> varchar2, date, etc).
if you already know cf is returning a datetime from a
datetime in the db, what's
the question?
> My concern comes from a fact that I've heard that
Coldfusion is treating the
"fact"? unless the datetime is stored as a string, that's not
a "fact".
> Example:
> Locale of database EU: yyyy/mm/dd
> Locale of Coldfusion US: yyyy/dd/mm
btw neither of your example "locales" are in fact locales.
> The date like 1st of February 2007 stored in a database
would look then in
> Coldfusion like: 2nd of January 2007
if you pass a numeric string representation (2/1/2007 for
instance) of a date to
cf, it will be interpreted via the cf server's "default"
local (ie en_US,
month/day/year) unless you use one of the LS functions like
LSParseDateTime() &
specifically set the the locale (like setLocale("th_TH")) or
make the date
non-ambiguous (2-feb-2007) or build the date yourself from
user input using
createDate() or createDateTime(). you just need to convert
the user's string
representation to a valid cf datetime object (or i guess
force to database to
follow the user's locale date mask).

Similar Messages

  • With 10.7.2 update iCal does not allow you to set "Reminders" by draging events from "All Day Events" into "Reminders" is there another way to do this instead of having to type out the entire reminder with date, time, and type?

    With 10.7.2 update iCal does not allow you to set "Reminders" by draging events from "All Day Events" into "Reminders" is there another way to do this instead of having to type out the entire reminder with date, time, and type?
    With Lion 10.7.1. you where able to drag events from "All Day Events" into the "Reminders" bar to create upcoming reminders.

    Exactly the same question I was about to post!
    Great being able to sync reminders (well overdue) however if I have to re-type a calener envent into reminders it's a waste of time!! 
    Come on Apple!!
    Just need an option for the calender event to add to reminder or the old drag to add to reminder functionality back, Please???

  • Can we extract blob objects from sql database to a human readable format?

    Hi All,
    I have question How can we extract
    blob objects from Sql database to human readable format ?
    Blob includes Images, text and docs.
    Thanks 
    Moug
    Best Regards Moug

    One thing you can do if its sql 2012 or later is to load the blob data to FileTable created in database. Then you would be able to physically browse to directory it points and see all files in its native format.
    see this for more details
    http://visakhm.blogspot.in/2012/07/working-with-filetables-in-sql-2012.html
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • [svn:osmf:] 14486: Add stream metadata support by extracting the actual metadata object from the binary data stream .

    Revision: 14486
    Revision: 14486
    Author:   [email protected]
    Date:     2010-03-01 14:27:41 -0800 (Mon, 01 Mar 2010)
    Log Message:
    Add stream metadata support by extracting the actual metadata object from the binary data stream.
    Fix bug 466
    Modified Paths:
        osmf/trunk/framework/OSMF/org/osmf/elements/f4mClasses/ManifestParser.as
        osmf/trunk/framework/OSMF/org/osmf/elements/f4mClasses/Media.as
        osmf/trunk/framework/OSMF/org/osmf/net/httpstreaming/HTTPStreamingUtils.as
        osmf/trunk/framework/OSMF/org/osmf/net/httpstreaming/f4f/HTTPStreamingF4FIndexHandler.as
        osmf/trunk/framework/OSMF/org/osmf/net/httpstreaming/f4f/HTTPStreamingF4FStreamInfo.as

    same problem, data not replicated.
    its captured,propagated from source,but not applied.
    also no apply errors in DBA_APPLY_ERROR. Looks like the problem is that LCRs propagated from source db do not reach target queue.can i get any help on this?
    queried results are as under:
    1.at source(capture process)
    Capture Session Total
    Process Session Serial Redo Entries LCRs
    Number ID Number State Scanned Enqueued
    CP01 16 7 CAPTURING CHANGES 1010143 72
    2. data propagated from source
    Total Time Executing
    in Seconds Total Events Propagated Total Bytes Propagated
    7 13 6731
    3. Apply at target(nothing is applied)
    Coordinator Session Total Total Total
    Process Session Serial Trans Trans Apply
    Name ID Number State Received Applied Errors
    A001 154 33 APPLYING 0 0 0
    4. At target:(nothing in buffer)
    Total Captured LCRs
    Queue Owner Queue Name LCRs in Memory Spilled LCRs in Buffered Queue
    STRMADMIN STREAMS_QUEUE 0 0 0

  • Copy Users/Permissions/objects from a database to another database

    Can anyone help me how to copy users, permissions, stored procedures, views, functions and all other objects from one database to another database.
     I need a SQL Script to get this job done. I cannot use backup restore or SSIS Package.

    There's also a transfer sqlserver objects task available in SSIS
    http://www.mssqltips.com/sqlservertip/2064/transfer-database-task-and-transfer-sql-server-objects-task-in-ssis/
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Displaying 'Date & Time' Column

    Hi there, I did do some searching/ reading prior to posting this, but haven't found what I'm looking for...
    I want to copy/ paste all my texts from my Nokia 6288 to my pc...
    -this works no hassle, I simply use the Nokia Phone Browser to load all my 'Inbox' and 'Sent Items' and move them to the desired folder on my hard drive...
    Problem is, in the Nokia Phone Browser, I get columns I can't seem to get in either Windows XP Pro or Windows Vista Business (which has more columns on offer)...
    This means, when im looking at the files on my PC, rather than using the nokia phone browser, i dont get the same details which is a bit of a problem for me...
    So what I want to know is:
    How do i get the Date & Time Column (and all the columns the Nokia Phone Browser displays) to show up in Windows XP or Vista or both?
    Thanks in advance

    Hi Austin,
    I have two remarks about that.
    1) It's better to put the population of change/history attributes into a table trigger of type before row where you assign these values. eg.:
    :NEW.CREATE_DATE := SYSDATE;
    :NEW.CREATE_USER := NVL(V('APP_USER'), USER);The reason is, it will consistently work for all applications which try to insert a record into this table and don't have to worry about change attributes and second, when you use the default property of APEX it will populate the column with the value when the new row was displayed and not when it was saved and third, a user would be able to fake this value and write something else into it (eg. with Firebug or by saving the HTML page) and "create" the record with a different time as you would expect. -> Define the column as "display only doesn't save state"
    2) Don't rely on automatic type conversion, remember that for APEX everything is a string that also means that your default value expression has to return a string to be 100% sure that it work on all systems where the default database format mask of Oracle could be different. Change your code to
    TO_DATE(SYSDATE, 'DD-MON-YYYY HH24:MI')Just some thoughts, but a testcase on apex.oracle.com is always good to reproduce and help with such a problem.
    Patrick
    My APEX Blog: http://www.inside-oracle-apex.com
    The ApexLib Framework: http://apexlib.sourceforge.net
    The APEX Builder Plugin: http://apexplugin.sourceforge.net/ New!

  • Adding 18 hrs to a Date/Time column

    Hi All 
    Power Query provides the functionality to add days to a Date/Time  column with the  " Date.AddDays()"  function. However this appears to only accept whole numbers as inputs.
    I want to add 18 hrs to a Date/Time column  How can I do this?
    Cheers
    Steve

    I was able to achieve this by converting the date into a number, adding 0.75 and then converting back into a date.
    Here is the code, source is just a workbook with the following data
    let
        Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
        AddC= Table.AddColumn(Source, "Time", each Number.From([DateTime])),
        ValueAdd = Table.AddColumn(AddC, "Custom", each [Time] + 0.75),
        HoursAdded = Table.AddColumn(ValueAdd, "Time +18", each DateTime.From([Custom]))
    in
       HoursAdded
    Final Output
    Would be interested if there is a more elegant alternative

  • How can I generate a real-time highchart from my database data?

    I have looked several links; however, I couldn't find a working demo showing how to implement a highchart using data from a database.
    Objective: I want to generate a real time highchart line graph getting data from my database. What I want is very similar to the
    HighChart Demo which provides a real-time highchart with randomly generated values. It is also similar by X-axis and Y-axis, for I want my x-axis to be "Time" (I have a DateTime column in my database) and y-axis to be an integer (I have
    a variable for that as well in my database).
    Please I need help in sending the model data to my razor view.
    Note that I am already using SignalR to display a realtime table. I also want to know if it can be used to automatically update the highchart as well.
    Below is the code snippet of my script in the view. I have used the code provided in
    HighChart Demo link for generating the highchart. Please tell me where should I apply the changes on my code.
    @section Scripts{
    <script src="~/Scripts/jquery.signalR-2.2.0.js"></script>
    <!--Reference the autogenerated SignalR hub script. -->
    <script src="~/SignalR/Hubs"></script>
    <script type="text/javascript">
    $(document).ready(function () {
    // Declare a proxy to reference the hub.
    var notifications = $.connection.dataHub;
    //debugger;
    // Create a function that the hub can call to broadcast messages.
    notifications.client.updateMessages = function () {
    getAllMessages()
    // Start the connection.
    $.connection.hub.start().done(function () {
    alert("connection started")
    getAllMessages();
    }).fail(function (e) {
    alert(e);
    //Highchart
    Highcharts.setOptions({
    global: {
    useUTC: false
    //Fill chart
    $('#container').highcharts({
    chart: {
    type: 'spline',
    animation: Highcharts.svg, // don't animate in old IE
    marginRight: 10,
    events: {
    load: function () {
    // set up the updating of the chart each second
    var series = this.series[0];
    setInterval(function () {
    var x = (new Date()).getTime(), // current time
    y = Math.random();
    series.addPoint([x, y], true, true);
    }, 1000);//300000
    title: {
    text: 'Live random data'
    xAxis: {
    type: 'datetime',
    tickPixelInterval: 150
    yAxis: {
    title: {
    text: 'Value'
    plotLines: [{
    value: 0,
    width: 1,
    color: '#808080'
    tooltip: {
    formatter: function () {
    return '<b>' + this.series.name + '</b><br/>' +
    Highcharts.dateFormat('%Y-%m-%d %H:%M:%S', this.x) + '<br/>' +
    Highcharts.numberFormat(this.y, 2);
    legend: {
    enabled: false
    exporting: {
    enabled: false
    series: [{
    name: 'Random data',
    data: (function () {
    // generate an array of random data
    var data = [],
    time = (new Date()).getTime(),
    i;
    for (i = -19; i <= 0; i += 1) {
    data.push({
    x: time + i * 1000,
    y: Math.random()
    return data;
    function getAllMessages() {
    var tbl = $('#messagesTable');
    var data = @Html.Raw(JsonConvert.SerializeObject(this.Model))
    $.ajax({
    url: '/nurse/GetMessages',
    data: {
    id: data.id,
    contentType: 'application/html ; charset:utf-8',
    type: 'GET',
    dataType: 'html'
    }).success(function (result) {
    tbl.empty().append(result);
    $("#g_table").dataTable();
    }).error(function (e) {
    alert(e);
    </script>

    Hi Sihem,
    Thank you for contacting National Instruments.  Using the LabVIEW Real-Time module, you can do development without actually having a target.  While viewing the project explorer window, you can do the following steps:
    Right click on the project
    Select New >> Targets and Devices
    Select the "New Target or Device" radio button
    Select the target you would like to develop on.Information about the LabVIEW Real-Time Module can be found here.
    Regards,
    Kevin H
    National Instruments
    WSN/Wireless DAQ Product Support Engineer

  • Problems returning complex objects from a php data service

    either the data services tool is buggy or i am doing something wrong. here is the code:
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
         xmlns:s="library://ns.adobe.com/flex/spark"
         xmlns:mx="library://ns.adobe.com/flex/halo"
         minWidth="1024" minHeight="768"
         xmlns:personservice="services.personservice.*"
         initialize="init()">
         <fx:Script>
              <![CDATA[
                   import mx.rpc.events.ResultEvent;
                   import mx.controls.Alert;
                   import mx.collections.ArrayCollection;
                   public var people:ArrayCollection;
                   private function init():void {
                        getPeopleInMyWorldResult.token = personService.getPeopleInMyWorld();
                   protected function getPeopleInMyWorldResult_resultHandler(event:ResultEvent):void {
                        people = new ArrayCollection(event.result as Array);
              ]]>
         </fx:Script>
         <fx:Declarations>
              <s:CallResponder id="getPeopleInMyWorldResult" result="getPeopleInMyWorldResult_resultHandler(event)"/>
              <personservice:PersonService id="personService"
                   destination="PersonService"
                   endpoint="http://localhost/photoapp/Test3-debug/gateway.php"
                   fault="Alert.show(event.fault.faultString)"
                   showBusyCursor="true"
                   source="PersonService"/>
         </fx:Declarations>
    </s:Application>
    <?php
    class Person {
         public $name;
         public $cars;
    class Car {
         public $year;
         public $make;
         public $model;
    class PersonService {
         public function getPeopleInMyWorld() {
              $person1 = new Person();
              $person1->name = "John Doe";
              $car1 = new Car();
              $car1->year = 2005;
              $car1->make = 'audi';
              $car1->model = 'A6 Quattro';
              $car2 = new Car();
              $car2->year = 1970;
              $car2->make = 'datsun';
              $car2->model = '510';
              $person1->cars = array($car1, $car2);
              $person2 = new Person();
              $person2->name = "Jane Doe";
              return array($person1, $person2);
    create a new "flex" project in FB Beta1 with a php server. Setup the application and php script as normal, then configure the return type for the getPeopleInMyWorld function. I created a new return type called "Person" and was quite please to see that FB automagically created a "Cars" class with the all the right properties.
    Unfortunately, if you run the code (try debug mode and put a breakpoint on the result handler) you'll notice that "john doe" has lost his cars and that you also get the silent (check console) error:
    TypeError: Error #1034: Type Coercion failed: cannot convert []@1226bc49 to mx.collections.ArrayCollection.
    any ideas??
    i can get this to work by using json, but it's extra work, the com.adobe.serializers.json.JSONDecoder has little documentation, and the method outlined above is just begging to work.
    so, how are the rest of you getting complex data back from your servers? json?? amfphp?? xml (but surely not)??
    also, since i'm here discussing data services, if any adobe ppl are about, please throw one extra voice behind the following feature requests:
    1) support for optional service call arguments (http://bugs.adobe.com/jira/browse/FB-19659)
    2) a button for automatically 'generating service calls' from within the data services panel.
    thanks,
    - e

    Thank you Gaurav for pointing me in the right direction. There was some debate in the blogs as to which data transferring method (amfphp, json, or xml) was best. See
    http://blogs.adobe.com/mikepotter/2006/07/php_and_flex_js.html
    and
    http://www.5etdemi.com/blog/archives/2006/12/clearing-the-fud-on-amfphps-speed-versus-json -and-xml/
    I used json yesterday
    php:  json_encode(array($p1, $p2));   // observation: you only have to encode once as opposed
                                          // to using amf on each array...
    FB:   private var jsonD:JSONDecoder = new JSONDecoder();
          var jsonString:String = {{{return result from service call}}}
          myPeople:ArrayCollection = jsonD.decode(jsonString, services.personservice.Person);
    Note that in FB you can use the services.personservice.Person class as an optional argument in the jsonD.decode function. This class can be automatically generated using FB's built-in data service's panel when you try to configure the return type (as I described above). The json data should unserialize correctly with Cars objects automagically created and everything (a huge time saver!!).
    It worked for me, though I'm not sure how deep the unserialization process is capable of going (objects within objects w/in objects, for example). Also I had some trouble with adobe's jsonDecoder; it had trouble eating (uhm parsing) hollow objects (i.e. objects with null properties), whereas the php_encode / php_decode handled these objects w/o fail.
    Anyway, will be reading up on amf. Tanx again Gaurav,
    - e

  • Creation of a complex object from several databases?

    Hello!
    We need to have an ability to change certain property of the record, stored in the database, without reading the full record from the database, changing the property and updating the database with this new record. As far as I know there's no way for partial access to the record data (LOB access section from FAQ), so I am thinking in a bit different way - what if we keep the information of certain record in the different databases, and when we need to update some property of the record knowing the key - we will just update the appropriate database? This looks something similar to secondary databases when the secondary key is an alias for primary record - but in this case primary key would be referenced from several databases and it would be possible to specify which data from which database to obtain using the key?
    I think it could be created based on several custom object bindings now, or something like this.

    Eugene,
    If you update properties in different combinations and there is no logical way to group them to reduce the size of the operations, then it's not worth splitting up the record. That's up to you to determine.
    JE SecondaryDatabase and SecondaryCursor methods have overloaded signatures for returning the secondary key, primary key, and primary data, all in one method call. So I think you're confused about the method signatures -- the data parameter is always used to return the primary data.
    Note that internally whenever you read via a secondary, JE does two reads: one to read the secondary index and get the primary key, and another to read the primary index.
    There is no trick to get around doing multiple reads when you have relationships between different databases. Each primary and secondary database is an index or map (conceptually the same as a java.util.Map) that can be accessed by key or by iterating. Whatever you do must be built on top of map operations.
    The best way to think about data modeling is to think about maps and their keys, and the best way to think about how to do a query is to break it down into map operations. I say this because most Java programmers are familiar with maps and map operations, because java.util.Map is commonly used.
    The DPL (persist package) makes data modeling simpler to code and understand, because annotations can be used describe relationships between indexes. When using the DPL it is very clear that for every secondary index there is a secondary key, and that entity relationships are formed via secondary keys. However, the DPL model is still based on maps and map operations.
    --mark                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • How to create multiple TYPES of objects from one menu?

    Q: How can I create a single class to create objects of multiple 'object classes' in a way that is not a huge switch statement?
    Explaination:
    Let's say that I have an application that I am building, that manages five hundred object types. A properly-built object subclassing tree is created, and I want to be able to create objects of any 'leaf node' of this subclassing tree using a single 'objectCreate()' method in a 'factory object'. The purpos of this method will be to create an instance of the correct object, pass a handle to a few collections for properly sorting and storing these objects in groups.
    Usually, one could create a switch in this function, testing for the type of object that the user wants to create from the menu. But in the case of having hundreds of possible object choices, this becomes harder and harder code to maintain (let alone performance).
    Any suggestions?

    But if my menu has:
    1. German Shepard
    2. Doberman Pinscher
    3. Malamut
    4. Persian Long-hair
    5. Siamese
    6. Tabby
    And my object class tree goes:
                                  [ Animal ]
                 [ Cat ]                              [ Dog ]
      [ various breeds ]                         [ various breeds ]How do I code the menu class to respond to the input, so that it runs the correct [breed] object's constructor?
    The line:
    Animal choice = new xxxxxxxx();
    I can't use a variable to replace 'xxxxxxxx' in run-time, but having a ton of choices in code sounds/looks unreasonable.
    if (choice == "Doberman Pinscher")
    Animal choice = new doberman();
    else if (choice == "Tabby")
    Animal choice = new tabby();
    Do you see what I am trying to avoid? I am not experienced enough to instantly realize how to avoid the latter, and instead, do a single instantiation command for the correct constructor.

  • How can I change database date/time(Sysdate) without changing OS date

    Hello all,
    I have a need to change the sysdate on a database for testing purposes and need to set the database date to a future date(ex. 6/30/2009). I have 2 other instances on the same server so changing the OS date is not an option. I'm familiar with setting the sysdate to a fixed value, but doing so changes the date to a constant because I still need the time to elapse. I've searched the forum and cannot find a way to do this. Any help would be greatly appreciated.
    Thanks,

    Write your own sysdate function in pl/sql and create public synonym.
    Sorry, It doesn't work.
    create public synonym sysdate from my_sysdate
    ERROR at line 1:
    ORA-00995: missing or invalid synonym identifierBartek
    Edited by: brtk on 2009-05-14 15:54

  • Convert field value from Double to Date Time.

    Hi Every one.  Its been a long time since i have last posted on this site but i need some help again please.
    I want to convert a field value (saved as format double) to a date time value. I dont seem to find a function
    that can do this can anyone give me some help please?
    A sample would be to convert 40249.6588697106 to the format of Date Time being 12/03/2010 15:48:46
    Any suggestion?
    Thanks

    You can define a date time variable and use CDateTime.
    dim d as DateTime
    d = CDateTime(40179.55833333)
    formula = d

  • How to change column "Date" from "Text" to "Date-Time" in Document Library.

    How to change column name "Date" from "Single line of Text" to "Date and Time" in Document Library.

    Hi,
    If you would change column type, you might need to re-create column.
    If you would like a text column to display in date format, you could refer to the links below:
    http://sharepoint.stackexchange.com/questions/45774/how-to-convert-date-field-in-single-line-of-text-using-calculated-columns
    http://yasuanantha.blogspot.com/2008/06/to-convert-text-column-to-date-column.html
    Regards,
    Rebecca Tu
    TechNet Community Support

  • DATALOAD with EIS from Oracle database - long time

    Hi, We are using EIS 6.2 and an Oracle database with Star Schema. Financial system is the Essbase application.Actually, the dataload takes more then 1:30 hours... That's not acceptable for us.Each month, we have more than 40 millions rows in the fact table. The frequence of the dataload is monthly.We have a idea to reduce the dataload time. We want to create a view on the fact table with only the month of the data wanted.Is it possible to load the data with EIS from a view fact table unstead the original fact table. Is it someone to use the view fact table?Thanks, Manon

    I am not sure how long is reasonable for your dataload. For some of our Essbase cubes are using Oracle views to build the outline and dataload. We have more than 70 millions new rows per month are loaded into the fact table. If you are just talking about dataload without outline update, it takes about 35 minutes to finished the dataload process.(the outline has 9 standard dimensions, one of the dimension has more than 150000 members) There are a couple of things may help you and need to check before you are using view fact table to do dataload, like indexes on your original fact table and the design/setting of your Essbase outline. Btw, we are on EIS 6.5 and Essbase 6.5.4. I hope this can help you.

Maybe you are looking for