Link to home
Create AccountLog in
Avatar of vjysakshi
vjysakshi

asked on

convert standard time to military time

if I pass 6 Am it should give me militart time

ex are 6 AM or 1 pM or 12 AM
SOLUTION
Avatar of Rikin Shah
Rikin Shah
Flag of India image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
ASKER CERTIFIED SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
@pratima_mcs

Did you forget about 1 AM to 11 AM?
For 1AM to 11 AM there will be no change right ?
Yes, but your code doesn't take that into account. The switch, as written, treats 1 AM and 1 PM the same, making both 1300.
SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of vjysakshi
vjysakshi

ASKER

good