Download MetaTrader 5
To add comments, please log in or register
Are you a real pro? Share your knowledge with millions of traders!
Tradeing Trader
556
Tradeing Trader 2014.04.23 08:39 

Hello,

i have time values in a string like "8:30am" or "11:15pm" and i would like to get that time values automatic in a timestemp format which is always 24 houers format, that better to use for codeing, does somebody know how to codeing a function that can change the pm and am time values into a timestemp or have somebody a ready to use function?

qjol
3243
qjol 2014.04.23 11:38  

in general:

use StringSubstr and check it, if it's "PM" add 12 hours

if after adding 12 hours it equals 24, then it's 00:15

Tradeing Trader
556
Tradeing Trader 2014.04.23 17:32  
that is to complicate, i often find errors when i try to make that, somebody with enough experience from the different time standards could do a usefull function which all other can use.
qjol
3243
qjol 2014.04.23 18:26  
PlanandTrade:
that is to complicate, i often find errors when i try to make that, somebody with enough experience from the different time standards could do a usefull function which all other can use.

ho ye of cource
whroeder1
13644
whroeder1 2014.04.23 19:13  
  1. qjol: if after adding 12 hours it equals 24, then it's 00:15
    12:xx AM (Midnight)00:xx

    12:xx PM (Noon)12:xx
    01:xx AM
    01:xx

    01:xx PM
    13:xx
    11:xx AM
    11:xx

    11:xx PM
    23:xx

  2. PlanandTrade: that is to complicate, i often find errors when i try to make that, somebody with enough experience from the different time standards could do a usefull function which all other can use.
    learn to code it, or pay someone. We're not going to code it FOR you. We are willing to HELP you when you post your attempt (using SRC) and the nature of your problem.
Alain Verleyen
Moderator
28672
Alain Verleyen 2014.04.23 22:23  
SYED NAUFAL GADDAFI
1401
SYED NAUFAL GADDAFI 2014.04.23 23:32  
angevoyageur:
?

LOL.. if you click the link, you will understand.
Alain Verleyen
Moderator
28672
Alain Verleyen 2014.04.24 06:57  
deysmacro:
LOL.. if you click the link, you will understand.

I saw the link don't worry.
Tjipke de Vries
6283
Tjipke de Vries 2014.04.24 07:49  
PlanandTrade:
that is to complicate, i often find errors when i try to make that, somebody with enough experience from the different time standards could do a usefull function which all other can use.


Did we see you tried, then how do we know how you tried ??

If you often find errors try to make it, then there has to be some attempt yours,....

It is you who wants to know how to code it.....

Then accept the way we do giving our help.

That way you get your experience also....

We don't post ready made solutions in case others having your problems also,

(that is not having enough experience with coding) so you and others

can keep copy and paste codes they find mostly 'to complicate' they don't wanna understand

/
To add comments, please log in or register