![]() the quick fix for me right now will probably be just two formula tools. so I still need to figure out how to have it replace just am with a.m. The problem as those more familiar with REGEX than myself will see right away that I'm replacing am or pm with just a.m. ![]() Although I don't full understand it but regex101 site is definitely helping me along. It felt like a huge win to finally understand a little REGEX. I can't even tell you how excited I am about this. Next my REGEX_Replace formula of which I am so proud, which takes the string output from the DateTime Tool where the time was formatted and looks for am or pm and replaces it with a.m. I don't know if anyone else will end up needing something like this but I know I'll forget and be searching for this in the future so this post is for me! The next step is to figure out how to make this all happen in one REGEX tool or formula tool.įirst the conversion from 24 to 12 hour format was easily accomplished with the DateTime Tool and the Alteryx documentation on DateTime Functions when you hit the Specifiers drop down you get an explanation of all the options for date and time formatting in the DateTime Tool and you find the element that gives you the am or pm is the code %P for lower case am/pm and %p for uppercase, but you also have to swap out the usual HH for an %I (upper case i) or if you want to get rid of the leading 0 on the hours you can use %l (lower case L) which gets a little confusing because they look the same in the formula below but you can see in the tool a preview of the output. ![]() super annoying but with Alteryx and REGEX problem solved. And after I used the 12 to 24 hour documentation to figure out the 24 to 12 path, I still had a client request to format the time a bit outside of normal parameters. is"īut what if you'd like to check what is the military time right now? Well, our army time converter has the answer as well - at the top of the tool, you'll see the current military time based on your local time (click the refresh button if needed, as it uses the time when loading the Omni webpage as a default).I just wrote my first REGEX expression from scratch, well sort of, with help from all the documentation and posts and YouTube videos from link to was great help) and the courage to try from I'm still running into a bit of snag but hopefully I'll sort it out eventually.Īfter searching the community I found posts regarding converting 12 hour time to 24 hour time but not the other way around. The calculator deals with the issue of flying colors, showing that 10 p.m. Input the time, don't forget to change a.m. Pick the time format - a 12-hour a.m./p.m. This time, you need to change the conversion type to the regular time to military option. The calculator also prompts you with how to read the military time ( seventeen hundred (hours) in our case).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |