Jump to content
Sign in to follow this  
autonoob

Removing certain characters in given string

Recommended Posts

autonoob

Hi all,

I am a total noob with auto it, but I am trying to write a function to remove characters from the given string, ie "DD/MM/YYYY HH:MM:SS" to "DDMMYYYY HHMM"

The "DD/MM/YYYY HH:MM:SS" is pull from a text file and used earlier in my script as $datetime, but i need to reuse the same date/time but in the different format later on.

I am not to sure how to about this, any help would be great.

Thanks!

Share this post


Link to post
Share on other sites
autonoob

like this?

$a = "HH:MM:SS" 
$b = StringReplace($a,":","")
MsgBox(0,"",$B)

how do i get it to chop of the last 2 characters? ie DDMMYYYY HHMM

Share this post


Link to post
Share on other sites
jokke

stringmid / stringleft / srtingright are good options


UDF:Crypter a file encrypt / decrypt tool with no need to remember a password again. Based on Caesar cipher using entire ASCII Table.Script's: PixelSearch Helper, quick and simple way to create a PixelSeach.Chatserver - simplified, not so complicated multi-socket server.AutoIT - Firewall, simple example on howto create a firewall with AutoIt.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.