Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
Posts: 188
Registered: ‎07-19-2012
My Device: Z10 Limited Edition and Dev Alpha C
My Carrier: Movistar-Venezuela
Accepted Solution

[Help] Time and Information BlackBerry in my application

Hello friends, how are you? Happy weekend.

I have a problem, well two problems the first simple

This code is to display the date.

 

 Label {
id: title
 text: {
var today = new Date();
 "Hoy es: " + (today.getDate() + "/" + today.getMonth() +1) + "/" + (today.getFullYear());
    }
   }
            

 ut do not get the command to display the time. As serious to show time ..?

 

My other question is, implement the BatterySample in my application and it works perfectly, it looks great. But I want to add

1) Percentage or battery level in Number
2) The pin from my BlackBerry
3) Serial
4) BlackBerry OS
5) Model

Not understand the examples correctly, since no documents but not appreciated as implement.


Follow me in Twitter:

@Marcossit

BBM Channel:

MarcossitDev: C0002C366  

DeviceSuite For BlackBerry 10:

Link to Download DeviceSuite:

Support was successful? Accept as Solution and click on:


Highlighted
Developer
Posts: 188
Registered: ‎07-19-2012
My Device: Z10 Limited Edition and Dev Alpha C
My Carrier: Movistar-Venezuela

Re: [Help] Time and Information BlackBerry in my application

[Help] Time and Information BlackBerry in my application


Follow me in Twitter:

@Marcossit

BBM Channel:

MarcossitDev: C0002C366  

DeviceSuite For BlackBerry 10:

Link to Download DeviceSuite:

Support was successful? Accept as Solution and click on:


Developer
Posts: 133
Registered: ‎03-28-2011
My Device: BlackBerry 9900 & PlayBook
My Carrier: Bell

Re: [Help] Time and Information BlackBerry in my application

Marco, you should break up your post into 2, since you're asking 2 questions. I'll address the first one:

 

import bb.cascades 1.0                                                         
                                                                               
Page {                                                                         
    Container {                                                                
        Label {                                                                
            text: {                                                            
                var today = new Date();                                        
                "Hoy es: " + (today.getDate() + "/" + (today.getMonth()+1) + "/" + today.getFullYear());                                                       
            }
        }    
    }     
}     

 That code works perfectly for me.


Founder of Pulsecode Inc. and taab
Authomator - Two-factor authentication codes on BlackBerry 10 - http://www.xitijpatel.com/ - Follow @xitijpatel
Is there a helpful or useful post in this thread? Click the thumbs up on it so that other people can find it more easily!