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


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
Developer
Posts: 93
Registered: ‎08-18-2011
My Device: 9550
My Carrier: At&T
Accepted Solution

How to get Application Build Date and Time?

Hi Guys,

 

 

I am developing application in Cascade.

 

What is the API i can use to get Application Build Date and Tiime?

 

 

 

Thanks,

Shwarup Biswas
Developer
Posts: 1,068
Registered: ‎11-24-2011
My Device: PlayBook
My Carrier: x

Re: How to get Application Build Date and Time?

you can use preprocessor directives __DATE__ and __TIME__

Developer
Posts: 6,152
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: How to get Application Build Date and Time?

[ Edited ]

I think the best the apis can do is the use of the platform service api's and read the file info...

 

http://developer.blackberry.com/cascades/reference/platform_info.html

 

But the best I think you'll get from that is the datetime it was installed on the device.

 

What are you trying to do?


If you've been helped click on Like Button, if you've been saved buy the app. Smiley Happy

Developer of stokLocker, Sympatico and Super Sentences.
Highlighted
Developer
Posts: 93
Registered: ‎08-18-2011
My Device: 9550
My Carrier: At&T

Re: How to get Application Build Date and Time?

I need to get the application build Date and Time not when it is installed on the device.
Thanks,

Shwarup Biswas
Developer
Posts: 93
Registered: ‎08-18-2011
My Device: 9550
My Carrier: At&T

Re: How to get Application Build Date and Time?

Hi BGmot,

 

How to use this preorocessor command. could you give me an example?

Thanks,

Shwarup Biswas
Developer
Posts: 1,068
Registered: ‎11-24-2011
My Device: PlayBook
My Carrier: x

Re: How to get Application Build Date and Time?

These macros are extended to C-strings at compilation time. It's up to you how/where to use them. As an example following would work I think:

fprintf(stderr, "build date is %s, build time is %s\n", __DATE__, __TIME__);

Developer
Posts: 93
Registered: ‎08-18-2011
My Device: 9550
My Carrier: At&T

Re: How to get Application Build Date and Time?

Thank you so much for this example. It works but not returning date.

i got an out put like bellow: 15:52:59
Thanks,

Shwarup Biswas
Developer
Posts: 93
Registered: ‎08-18-2011
My Device: 9550
My Carrier: At&T

Re: How to get Application Build Date and Time?

Its working. Thanks
Thanks,

Shwarup Biswas
Developer
Posts: 89
Registered: ‎03-17-2013
My Device: Dev Alpha + Z10
My Carrier: I carry it myself.

Re: How to get Application Build Date and Time?

 

What about QML? Do I have to use setContextProperty() to set the variables from C++?


SQL Terminal – command-line interface to local SQLite database