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
Shwarup
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
Please use plain text.
Developer
BGmot
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__

Please use plain text.
Developer
BBSJdev
Posts: 6,089
Registered: ‎07-05-2012
My Device: Playbook, Z10 LE, Dev Alpha C
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. :smileyhappy:

Developer of stokLocker, Sympatico and Super Sentences.
Please use plain text.
Developer
Shwarup
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
Please use plain text.
Developer
Shwarup
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
Please use plain text.
Developer
BGmot
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__);

Please use plain text.
Developer
Shwarup
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
Please use plain text.
Developer
Shwarup
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
Please use plain text.
Developer
ondrejandrej
Posts: 73
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
Please use plain text.